Skip to content

Commit

Permalink
fix doc strings in test and factories
Browse files Browse the repository at this point in the history
  • Loading branch information
danangmassandy committed Jun 25, 2024
1 parent a3cfd60 commit 67d9d84
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
15 changes: 10 additions & 5 deletions django_project/gap/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

class ProviderFactory(DjangoModelFactory):
"""Factory class for Provider model."""
class Meta:

class Meta: # noqa
model = Provider

name = factory.Faker('company')
Expand All @@ -23,7 +24,8 @@ class Meta:

class AttributeFactory(DjangoModelFactory):
"""Factory class for Attribute model."""
class Meta:

class Meta: # noqa
model = Attribute

name = factory.Sequence(
Expand All @@ -34,7 +36,8 @@ class Meta:

class CountryFactory(DjangoModelFactory):
"""Factory class for Country model."""
class Meta:

class Meta: # noqa
model = Country

name = factory.Faker('country')
Expand All @@ -49,7 +52,8 @@ class Meta:

class StationFactory(DjangoModelFactory):
"""Factory class for Station model."""
class Meta:

class Meta: # noqa
model = Station

name = factory.Sequence(
Expand All @@ -64,7 +68,8 @@ class Meta:

class MeasurementFactory(DjangoModelFactory):
"""Factory class for Measurement model."""
class Meta:

class Meta: # noqa
model = Measurement

station = factory.SubFactory(StationFactory)
Expand Down
10 changes: 5 additions & 5 deletions django_project/gap/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


class ProviderCRUDTest(TestCase):
"""Provider test case"""
"""Provider test case."""

def test_create_provider(self):
"""Test create provider object."""
Expand Down Expand Up @@ -51,7 +51,7 @@ def test_delete_provider(self):


class AttributeCRUDTest(TestCase):
"""Attribute test case"""
"""Attribute test case."""

def test_create_attribute(self):
"""Test create attribute object."""
Expand Down Expand Up @@ -83,7 +83,7 @@ def test_delete_attribute(self):


class CountryCRUDTest(TestCase):
"""Country test case"""
"""Country test case."""

def test_create_country(self):
"""Test create country object."""
Expand Down Expand Up @@ -115,7 +115,7 @@ def test_delete_country(self):


class StationCRUDTest(TestCase):
"""Station test case"""
"""Station test case."""

def test_create_station(self):
"""Test create station object."""
Expand Down Expand Up @@ -147,7 +147,7 @@ def test_delete_station(self):


class MeasurementCRUDTest(TestCase):
"""Measurement test case"""
"""Measurement test case."""

def test_create_measurement(self):
"""Test create measurement object."""
Expand Down

0 comments on commit 67d9d84

Please sign in to comment.