def test_check_placex_table_size_bad(temp_db_cursor, temp_db_conn, def_config): temp_db_cursor.execute('CREATE TABLE placex (place_id int)') assert chkdb.check_placex_size(temp_db_conn, def_config) == chkdb.CheckState.FATAL
def test_check_placex_table_size_bad(table_factory, temp_db_conn, def_config): table_factory('placex') assert chkdb.check_placex_size(temp_db_conn, def_config) == chkdb.CheckState.FATAL
def test_check_placex_table_size_good(temp_db_cursor, temp_db_conn, def_config): temp_db_cursor.execute('CREATE TABLE placex (place_id int)') temp_db_cursor.execute('INSERT INTO placex VALUES (1), (2)') assert chkdb.check_placex_size(temp_db_conn, def_config) == chkdb.CheckState.OK
def test_check_placex_table_size_good(table_factory, temp_db_conn, def_config): table_factory('placex', content=((1, ), (2, ))) assert chkdb.check_placex_size(temp_db_conn, def_config) == chkdb.CheckState.OK