The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Remove settings dependency from test

gitter-badge
Gergely Polonkai 7 years ago
parent a39742e991
commit 5093ab1e6d
  1. 5
      words/tests.py

@ -1,6 +1,5 @@
# -*- coding: utf-8
from datetime import timedelta
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.utils import timezone
@ -77,14 +76,14 @@ class DrawTest(TestCase):
draw.save()
self.assertEquals(self.word, self.user.current_word())
@override_settings(DRAW_TIME='1 00:00:00')
def test_draw_word(self):
draw = Draw.objects.create(user=self.user,
word=self.word,
accepted=None)
self.assertEquals(self.word, self.user.draw_word())
draw.accepted = True
duration = parse_duration(settings.DRAW_TIME)
draw.timestamp -= 2 * duration
draw.timestamp -= datetime.timespan(days=2)
draw.save()
Work.objects.create(draw=draw)

Loading…
Cancel
Save