diff --git a/test/imports/test_imports.py b/test/imports/test_imports.py index 34b39be69cb72eb57b3ee892ffadacb9561f6e9d..2b42d4631f72dcee625c02715bc2672cfb8772b9 100644 --- a/test/imports/test_imports.py +++ b/test/imports/test_imports.py @@ -9,6 +9,7 @@ from gso.products.product_blocks.iptrunk import IptrunkType, PhyPortCapacity from gso.products.product_blocks.router import RouterRole, RouterVendor from gso.products.product_blocks.site import SiteTier from gso.utils.helpers import iso_from_ipv4 +from gso.api.v1.imports import SiteImportModel SITE_IMPORT_ENDPOINT = "/api/v1/imports/sites" ROUTER_IMPORT_ENDPOINT = "/api/v1/imports/routers" @@ -82,7 +83,7 @@ def test_import_iptrunk_successful_with_mocked_process(mock_start_process, test_ @pytest.fixture def site_data(faker): return { - "site_name": faker.domain_word(), + "site_name": faker.site_name(), "site_city": faker.city(), "site_country": faker.country(), "site_country_code": faker.country_code(), @@ -294,3 +295,7 @@ def test_import_iptrunk_fails_on_side_a_and_b_members_mismatch( assert response.json() == { "detail": [{"loc": ["body", "__root__"], "msg": "Mismatch between Side A and B members", "type": "value_error"}] } + + def test_site_name_is_valid(): + site_model = SiteImportModel(site_name="123456") + assert site_model is not None