1 from .fixtures import app_client
4 pytest.fixture(scope='module')(app_client)
6 def test_homepage(app_client):
7 _, response = app_client.get('/.json')
8 assert response.status == 200
9 assert response.json.keys() == {'test_tables': 0}.keys()
10 d = response.json['test_tables']
11 assert d['name'] == 'test_tables'
12 assert d['tables_count'] == 4
14 def test_database_page(app_client):
15 response = app_client.get('/test_tables.json', gather_request=False)
17 assert 'test_tables' == data['database']
26 'foreign_keys': {'incoming': [], 'outgoing': []}
28 'name': '/group1/array2',
35 'foreign_keys': {'incoming': [], 'outgoing': []}
37 'name': '/group1/table1',
38 'columns': ['identity', 'idnumber', 'speed'],
44 'foreign_keys': {'incoming': [], 'outgoing': []}
46 'name': '/group2/table2',
47 'columns': ['identity', 'idnumber', 'speed'],
53 'foreign_keys': {'incoming': [], 'outgoing': []}