4646)
4747
4848
49- class CatalogTypeTest ( unittest . TestCase ) :
49+ class TestCatalogType :
5050 def test_determine_type_for_absolute_published (self ) -> None :
5151 cat = TestCases .case_1 ()
5252 with tempfile .TemporaryDirectory () as tmp_dir :
@@ -56,7 +56,7 @@ def test_determine_type_for_absolute_published(self) -> None:
5656 )
5757
5858 catalog_type = CatalogType .determine_type (cat_json )
59- self . assertEqual ( catalog_type , CatalogType .ABSOLUTE_PUBLISHED )
59+ assert catalog_type == CatalogType .ABSOLUTE_PUBLISHED
6060
6161 def test_determine_type_for_relative_published (self ) -> None :
6262 cat = TestCases .case_2 ()
@@ -67,14 +67,14 @@ def test_determine_type_for_relative_published(self) -> None:
6767 )
6868
6969 catalog_type = CatalogType .determine_type (cat_json )
70- self . assertEqual ( catalog_type , CatalogType .RELATIVE_PUBLISHED )
70+ assert catalog_type == CatalogType .RELATIVE_PUBLISHED
7171
7272 def test_determine_type_for_self_contained (self ) -> None :
7373 cat_json = pystac .StacIO .default ().read_json (
7474 TestCases .get_path ("data-files/catalogs/test-case-1/catalog.json" )
7575 )
7676 catalog_type = CatalogType .determine_type (cat_json )
77- self . assertEqual ( catalog_type , CatalogType .SELF_CONTAINED )
77+ assert catalog_type == CatalogType .SELF_CONTAINED
7878
7979 def test_determine_type_for_unknown (self ) -> None :
8080 catalog = Catalog (id = "test" , description = "test desc" )
@@ -83,7 +83,7 @@ def test_determine_type_for_unknown(self) -> None:
8383 catalog .normalize_hrefs ("http://example.com" )
8484 d = catalog .to_dict (include_self_link = False )
8585
86- self . assertIsNone ( CatalogType .determine_type (d ))
86+ assert CatalogType .determine_type (d ) is None
8787
8888
8989class TestCatalog :
0 commit comments