1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00

fix tests (#869)

This commit is contained in:
Matt Griswold
2020-11-04 07:39:15 +00:00
committed by GitHub
parent 2ca4eb96de
commit a2d14a6658
3 changed files with 4 additions and 3 deletions

View File

@@ -13,7 +13,6 @@ from peeringdb_server.models import Organization
FIVE_MONTHS_AGO = datetime.now(tz=timezone.utc) - timedelta(days=150)
TWO_MONTHS_AGO = datetime.now(tz=timezone.utc) - timedelta(days=60)
NOW = datetime.now(tz=timezone.utc)
# max number of seconds we allow between running command and asserting date is
# the same
SECONDS_THRESHOLD = 120
@@ -22,6 +21,7 @@ SECONDS_THRESHOLD = 120
@pytest.mark.django_db
@override_settings(SPONSORSHIPS_EMAIL="localhost")
def test_send_email(outdated_sponsorship):
NOW = datetime.now(tz=timezone.utc)
sponsorship = Sponsorship.objects.all()[0]
call_command("pdb_sponsorship_notify")
sponsorship.refresh_from_db()