Refactor endpoint tests
Replace force_login calls with login call from client class in setUp
This commit is contained in:
parent
a85fe2c02f
commit
3cbf50d0b0
8 changed files with 131 additions and 20 deletions
|
|
@ -15,9 +15,9 @@ def build_publication_date(dt, tz):
|
|||
naive_datetime = datetime(*dt[:6])
|
||||
published_parsed = timezone.make_aware(naive_datetime, timezone=tz)
|
||||
except (TypeError, ValueError):
|
||||
return None, False
|
||||
return timezone.now()
|
||||
|
||||
return published_parsed.astimezone(pytz.utc), True
|
||||
return published_parsed.astimezone(pytz.utc)
|
||||
|
||||
|
||||
def fetch(url):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue