0004-tests-keep-new-table-contents-during-tests-38067.patch
tests/test_schema2.py | ||
---|---|---|
42 | 42 |
visualization_page = response.click(lambda x: x == visualization) |
43 | 43 |
assert 'big-msg-info' not in visualization_page |
44 | 44 |
table = get_table(visualization_page) |
45 |
d = {} |
|
46 |
new_table_path = 'tests/fixtures/schema2/new_tables.json' |
|
47 |
if os.path.exists(new_table_path): |
|
48 |
with open(new_table_path) as fd: |
|
49 |
d = json.load(fd) |
|
50 |
if 'tables' in d: |
|
51 |
d = d['tables'] |
|
52 |
d[visualization] = table |
|
53 |
with open(new_table_path, 'w') as fd: |
|
54 |
json.dump(d, fd, indent=4, sort_keys=True) |
|
45 | 55 |
assert_equal_tables( |
46 | 56 |
schema2['tables'][visualization], |
47 | 57 |
table) |
48 |
- |