0001-tests-correct-tests-on-themes-41306.patch
tests/test_theme.py | ||
---|---|---|
32 | 32 |
assert Variable.objects.filter(name='foo')[0].value == '' |
33 | 33 | |
34 | 34 |
# easter egg, sometimes it gets sorted by colour |
35 | 35 |
mocked_random.return_value = 0.09 |
36 | 36 |
resp = app.get('/theme').follow() |
37 | 37 |
assert [x['value'] for x in resp.html.findAll('input', {'type': 'radio'})] == ['publik', 'alfortville'] |
38 | 38 | |
39 | 39 | |
40 |
def test_thme_view_empty(app, admin_user, settings): |
|
40 |
def test_theme_view_empty(app, admin_user, settings):
|
|
41 | 41 |
del settings.THEMES_DIRECTORY |
42 | 42 |
app = login(app) |
43 | 43 |
resp = app.get('/theme').follow() |
44 | 44 |
assert 'Theme' in resp.text |
45 | 45 | |
46 | 46 | |
47 |
def test_theme_option_view(app, admin_user): |
|
47 |
def test_theme_option_view(app, admin_user, fake_themes):
|
|
48 | 48 |
app = login(app) |
49 | 49 |
resp = app.get('/theme').follow() |
50 | 50 |
resp = resp.click('Options') |
51 | 51 |
assert resp.html.find('label').text == 'Global Title:' |
52 | 52 |
resp.form['global_title'] = 'foo' |
53 | 53 |
resp = resp.form.submit() |
54 | 54 |
assert Variable.objects.all()[0].name == 'global_title' |
55 | 55 |
assert Variable.objects.all()[0].value == 'foo' |
56 |
- |