diff options
author | maxbr <maxbr@mi.fu-berlin.de> | 2016-08-19 17:11:58 +0200 |
---|---|---|
committer | maxbr <maxbr@mi.fu-berlin.de> | 2016-08-19 17:11:58 +0200 |
commit | a1da09ca6e089913a6aacd5f55051a7f19d6f1fc (patch) | |
tree | 2b2a498a4eb0135bc99d03fe0e2aff2d6fbe8ab1 /pharos-dashboard/booking/tests/test_models.py | |
parent | 79aec84973032e15ae9d36fcbd7d7d42af3283d1 (diff) |
Implement periodic tasks
JIRA: RELENG-12
The dashboard is now querying jenkins periodically and saving the
results in the database. This fixes delays that were caused by calling
the jenkins API.
Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
Diffstat (limited to 'pharos-dashboard/booking/tests/test_models.py')
-rw-r--r-- | pharos-dashboard/booking/tests/test_models.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pharos-dashboard/booking/tests/test_models.py b/pharos-dashboard/booking/tests/test_models.py index e933f6e..00f6b26 100644 --- a/pharos-dashboard/booking/tests/test_models.py +++ b/pharos-dashboard/booking/tests/test_models.py @@ -6,12 +6,15 @@ from django.utils import timezone from booking.models import Booking from dashboard.models import Resource +from jenkins.models import JenkinsSlave class BookingModelTestCase(TestCase): def setUp(self): - self.res1 = Resource.objects.create(name='res1', slavename='s1', description='x', url='x') - self.res2 = Resource.objects.create(name='res2', slavename='s2', description='x', url='x') + self.slave = JenkinsSlave.objects.create(name='test', url='test') + + self.res1 = Resource.objects.create(name='res1', slave=self.slave, description='x', url='x') + self.res2 = Resource.objects.create(name='res2', slave=self.slave, description='x', url='x') self.user1 = User.objects.create(username='user1') |