linter fixes

This commit is contained in:
matthewswspence 2024-08-27 15:19:36 -05:00
parent 9c069a8e64
commit 09ba7450b3
No known key found for this signature in database
GPG key ID: FB458202A7852BA4
2 changed files with 6 additions and 6 deletions

View file

@ -11,7 +11,7 @@ class Command(BaseCommand, PopulateScriptTemplate):
help = "Loops through each domain request object and populates the last_status_update and first_submitted_date"
def handle(self, **kwargs):
"""Loops through each DomainRequest object and populates
"""Loops through each DomainRequest object and populates
its last_status_update and first_submitted_date values"""
self.mass_update_records(DomainRequest, None, ["last_status_update", "first_submitted_date"])
@ -34,12 +34,12 @@ class Command(BaseCommand, PopulateScriptTemplate):
break
logger.info(
f"""{TerminalColors.OKCYAN}Updating {record} =>
first submitted date: {record.first_submitted_date},
f"""{TerminalColors.OKCYAN}Updating {record} =>
first submitted date: {record.first_submitted_date},
last status update: {record.last_status_update}{TerminalColors.ENDC}
"""
)
def should_skip_record(self, record) -> bool:
# make sure the record had some kind of history
return not LogEntry.objects.filter(object_pk=record.pk).exists()
return not LogEntry.objects.filter(object_pk=record.pk).exists()

View file

@ -287,7 +287,7 @@ class GetRequestsJsonTest(TestWithUser, WebTest):
def test_sorting(self):
"""test that sorting works properly on the result set"""
response = self.app.get(reverse("get_domain_requests_json"),
response = self.app.get(reverse("get_domain_requests_json"),
{"sort_by": "last_submitted_date", "order": "desc"})
self.assertEqual(response.status_code, 200)
data = response.json
@ -307,7 +307,7 @@ class GetRequestsJsonTest(TestWithUser, WebTest):
def test_filter_approved_excluded(self):
"""test that approved requests are excluded from result set."""
# sort in reverse chronological order of submission date, since most recent request is approved
response = self.app.get(reverse("get_domain_requests_json"),
response = self.app.get(reverse("get_domain_requests_json"),
{"sort_by": "last_submitted_date", "order": "desc"})
self.assertEqual(response.status_code, 200)
data = response.json