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 | 66eb4d851e63d20031502ec0c96aaabe34c6fd32 (patch) | |
tree | 98248b6faf6b3c742efef258e34f06cc92d1a888 /tools/pharos-dashboard/booking/tests/test_models.py | |
parent | 3b5ef3b0a88247eeafeee878de528aad71f9fd4b (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 'tools/pharos-dashboard/booking/tests/test_models.py')
-rw-r--r-- | tools/pharos-dashboard/booking/tests/test_models.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/pharos-dashboard/booking/tests/test_models.py b/tools/pharos-dashboard/booking/tests/test_models.py index e933f6e8..00f6b266 100644 --- a/tools/pharos-dashboard/booking/tests/test_models.py +++ b/tools/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') |