def test_get_count(): table = bcdata.get_table_name(UTMZONES_KEY) assert bcdata.get_count(table) == 6
def test_get_table_name_urlparse(): # bcdc api query result["object_name"] is not correct WFS layer name, # use WFS resource url table = bcdata.get_table_name("natural-resource-nr-district") assert table == "WHSE_ADMIN_BOUNDARIES.ADM_NR_DISTRICTS_SPG"
def test_get_table_name(): table = bcdata.get_table_name(AIRPORTS_PACKAGE) assert table == AIRPORTS_TABLE
def test_table_name_uppercase(): table = bcdata.get_table_name(AIRPORTS_PACKAGE.upper()) assert table == AIRPORTS_TABLE
def test_get_table_name_multiresource(): # this package has several WFS layers with pytest.raises(ValueError): bcdata.get_table_name("forest-development-units")