Skip to content

Commit

Permalink
[#513] fix flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonny Bakker committed Jan 9, 2025
1 parent c356e0d commit 3711aa7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions src/objects/tests/v1/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def test_filter_exclude_old_records(self):
start_at=date.today() - timedelta(days=10),
end_at=date.today() - timedelta(days=1),
)
record_new = ObjectRecordFactory.create(
ObjectRecordFactory.create(
data={"diameter": 50}, object=record_old.object, start_at=record_old.end_at
)

Expand Down Expand Up @@ -371,7 +371,7 @@ def test_filter_date_detail(self):
record1 = ObjectRecordFactory.create(
object=object, start_at="2020-01-01", end_at="2020-12-31"
)
record2 = ObjectRecordFactory.create(object=object, start_at="2021-01-01")
ObjectRecordFactory.create(object=object, start_at="2021-01-01")

url = reverse_lazy("object-detail", args=[object.uuid])

Expand All @@ -385,7 +385,7 @@ def test_filter_date_detail(self):

def test_filter_date_detail_no_actual_record(self):
object = ObjectFactory.create(object_type=self.object_type)
record = ObjectRecordFactory.create(object=object, start_at="2021-01-01")
ObjectRecordFactory.create(object=object, start_at="2021-01-01")

url = reverse_lazy("object-detail", args=[object.uuid])

Expand All @@ -399,9 +399,9 @@ def test_filter_date_list(self):
record11 = ObjectRecordFactory.create(
object=object1, start_at="2020-01-01", end_at="2020-12-31"
)
record12 = ObjectRecordFactory.create(object=object1, start_at="2021-01-01")
ObjectRecordFactory.create(object=object1, start_at="2021-01-01")
# object 2 - don't show
record21 = ObjectRecordFactory.create(
ObjectRecordFactory.create(
object__object_type=self.object_type, start_at="2021-01-01"
)

Expand All @@ -424,7 +424,7 @@ def test_filter_registration_date_detail(self):
object=object,
registration_at="2020-01-01",
)
record2 = ObjectRecordFactory.create(
ObjectRecordFactory.create(
object=object, registration_at="2021-01-01"
)

Expand All @@ -440,7 +440,7 @@ def test_filter_registration_date_detail(self):

def test_filter_registration_date_detail_no_record(self):
object = ObjectFactory.create(object_type=self.object_type)
record = ObjectRecordFactory.create(object=object, registration_at="2021-01-01")
ObjectRecordFactory.create(object=object, registration_at="2021-01-01")

url = reverse_lazy("object-detail", args=[object.uuid])

Expand All @@ -454,11 +454,11 @@ def test_filter_registration_date_list(self):
record11 = ObjectRecordFactory.create(
object=object1, registration_at="2020-01-01"
)
record12 = ObjectRecordFactory.create(
ObjectRecordFactory.create(
object=object1, registration_at="2021-01-01"
)
# object 2 - don't show
record21 = ObjectRecordFactory.create(
ObjectRecordFactory.create(
object__object_type=self.object_type, registration_at="2021-01-01"
)

Expand Down
2 changes: 1 addition & 1 deletion src/objects/tests/v1/test_object_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_list_actual_objects(self, m):
object__object_type=self.object_type,
start_at=date.today(),
)
object_record2 = ObjectRecordFactory.create(
ObjectRecordFactory.create(
object__object_type=self.object_type,
start_at=date.today() - timedelta(days=10),
end_at=date.today() - timedelta(days=1),
Expand Down
10 changes: 5 additions & 5 deletions src/objects/tests/v1/test_stuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test_2a_2_records_found(self):
Test 2a: If records 1 and 40 exists, material history and formal history on
01-01-2020 should say: Record 40
"""
record_1 = ObjectRecordFactory.create(
ObjectRecordFactory.create(
object=self.object,
data={
"geslachtsnaam": "Poepenstaart",
Expand Down Expand Up @@ -177,7 +177,7 @@ def test_3a_3_records_found(self):
Test 3a: If records 1, 40 and 50 exists, material history and formal history
on 01-01-2020 should say: Record 50
"""
record_1 = ObjectRecordFactory.create(
ObjectRecordFactory.create(
object=self.object,
data={
"geslachtsnaam": "Poepenstaart",
Expand All @@ -189,7 +189,7 @@ def test_3a_3_records_found(self):
end_at=date(2001, 9, 3),
registration_at=date(1977, 8, 7),
)
record_40 = ObjectRecordFactory.create(
ObjectRecordFactory.create(
object=self.object,
data={
"geslachtsnaam": "Bergh",
Expand Down Expand Up @@ -274,7 +274,7 @@ def test_3b_3_records_not_found(self):


class Stuf22Tests(TokenAuthMixin, APITestCase):
"""
""" # noqa
Test cases based on the Table 2.2 in the StUF 03.01
|PersoonsId|volgnummer|geslachtsnaam|voorvoegsel|voorletters|geboortedatum|burgerlijkestaat|beginGeldigheid|tijdstipRegistratie|
|----------|----------|-------------|-----------|-----------|-------------|----------------|---------------|-------------------|
Expand Down Expand Up @@ -403,7 +403,7 @@ def test_4d_not_found(self):


class Stuf23Tests(TokenAuthMixin, APITestCase):
"""
""" # noqa
Test cases based on the Table 2.2 in the StUF 03.01
|PersoonsId|volgnummer|geslachtsnaam|voorvoegsel|voorletters|geboortedatum|burgerlijkestaat|beginGeldigheid|tijdstipRegistratie|volgnrNaCorrectie|
|----------|----------|-------------|-----------|-----------|-------------|----------------|---------------|-------------------|-----------------|
Expand Down

0 comments on commit 3711aa7

Please sign in to comment.