def test_create__requires_no_params(self) -> None:
        """Check that the RegionFactory create method does not require params."""
        region: dict = RegionFactory.create()

        assert region is not None

        self.api.delete_region(region)
    def test_create__returns_type_dict(self) -> None:
        """Check that the RegionFactory create method returns a dictionary."""
        region = RegionFactory.create()

        assert type(region) == dict

        self.api.delete_region(region)
    def test_build__override_default_values(self) -> None:
        """Check that RegionFactory values may be overridden post-build."""
        region: dict = RegionFactory.build()
        default_region_name: str = region['name']
        region['name'] = 'Test Region'

        assert region['name'] != default_region_name
Exemplo n.º 4
0
    def create_region(self) -> Generator[dict, None, None]:
        """Create a Region via API for RegionsAPI method testing.

        This region should be used in testing API deletion methods.
        """
        region: dict = RegionFactory.create()

        yield region
Exemplo n.º 5
0
    def build_region(self) -> Generator[dict, None, None]:
        """Build a Region object for RegionsAPI method testing.

        This region should be used in testing API creation methods.
        """
        region: dict = RegionFactory.build()

        yield region
    def test_build__subsequent_calls_return_new_region(self) -> None:
        """Check that a new Region is returned from the RegionFactory build method."""
        region_one: dict = RegionFactory.build()
        region_two: dict = RegionFactory.build()

        assert region_one != region_two
    def test_build__returns_type_dict(self) -> None:
        """Check that the RegionFactory build method returns a dictionary."""
        region = RegionFactory.build()

        assert type(region) == dict
    def test_build__requires_no_params(self) -> None:
        """Check that the RegionFactory build method does not require params."""
        region: dict = RegionFactory.build()

        assert region is not None