File: test_deploy.py

package info (click to toggle)
pastewebkit 1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 536 kB
  • ctags: 662
  • sloc: python: 3,346; makefile: 41
file content (21 lines) | stat: -rw-r--r-- 611 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from fixture import *

def test_deploy():
    app = makeapp('test_deploy.ini')
    res = app.get('/')
    assert 'All OK' in res
    assert "'app_config1': 'foo'" in res
    app = makeapp('test_deploy.ini', name='second')
    res = app.get('/')
    assert 'All OK' in res
    assert "'app_config1': 'foo'" in res
    assert "'app_config2': 'bar'" in res

def test_deploy_mult():
    app = makeapp('test_deploy.ini', name='mult')
    res = app.get('/')
    assert "'app_config1': 'foo'" in res
    assert "'app_config2': 'bar'" not in res
    res = app.get('/sec/')
    assert "'app_config2': 'bar'" in res