tests: don't use "aaa" as list item to avoid clash with statics hash

This commit is contained in:
Frédéric Péters 2019-04-16 10:06:28 +02:00
parent e3a4f92817
commit fb1e70e94d
1 changed files with 4 additions and 4 deletions

View File

@ -4387,11 +4387,11 @@ def test_data_sources_view(pub):
assert 'Python Expression' in resp.body
assert not 'Preview' in resp.body
data_source.data_source = {'type': 'formula', 'value': '["aaa", "bbb"]'}
data_source.data_source = {'type': 'formula', 'value': '["AAA", "BBB"]'}
data_source.store()
resp = app.get('/backoffice/settings/data-sources/%s/' % data_source.id)
assert 'Preview' in resp.body
assert resp.body.count('aaa') == 3 # expression + id + text
assert resp.body.count('AAA') == 3 # expression + id + text
# check unicode
data_source.data_source = {'type': 'formula',
@ -4422,8 +4422,8 @@ def test_data_sources_view(pub):
assert '<li>...</li>' in resp.body
data_source.data_source = {'type': 'formula', 'value': repr([
{'id': 'a', 'text': 'bbb', 'foo': 'bar1'},
{'id': 'b', 'text': 'bbb', 'foo': 'bar2'},
{'id': 'a', 'text': 'BBB', 'foo': 'bar1'},
{'id': 'b', 'text': 'BBB', 'foo': 'bar2'},
])}
data_source.store()
resp = app.get('/backoffice/settings/data-sources/%s/' % data_source.id)