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:
@ -14,7 +14,8 @@ RUN apk --update --no-cache add \
|
||||
libjpeg-turbo-dev \
|
||||
linux-headers \
|
||||
make \
|
||||
mariadb-dev
|
||||
mariadb-dev \
|
||||
libffi-dev
|
||||
|
||||
# create venv
|
||||
RUN pip install -U pip pipenv
|
||||
|
@ -121,7 +121,7 @@ class RdapLookup(rdap.RdapClient):
|
||||
config = dict(
|
||||
bootstrap_url=settings.RDAP_URL.rstrip("/"),
|
||||
lacnic_apikey=settings.RDAP_LACNIC_APIKEY,
|
||||
timeout=2.5,
|
||||
timeout=10,
|
||||
)
|
||||
super().__init__(config)
|
||||
|
||||
|
@ -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()
|
||||
|
Reference in New Issue
Block a user