Exemple #1
0
 def test_adding_bzurl_adds_backlog_bugs(self):
     """Adding a url to a project should populate the backlog."""
     # should have created and loaded bugs when fixture loaded
     self.p.backlog_bugs.clear()
     eq_(self.p.backlog_bugs.count(), 0)
     # now this should update the existing bugs w/ the backlog
     BugzillaURL.objects.create(url=GOOD_BZ_URL, project=self.p)
     scrum_cron.sync_backlogs()
     eq_(self.p.backlog_bugs.count(), 20)
Exemple #2
0
 def test_adding_bzurl_adds_backlog_bugs(self):
     """Adding a url to a project should populate the backlog."""
     # should have created and loaded bugs when fixture loaded
     self.p.backlog_bugs.clear()
     eq_(self.p.backlog_bugs.count(), 0)
     # now this should update the existing bugs w/ the backlog
     BugzillaURL.objects.create(url=GOOD_BZ_URL, project=self.p)
     scrum_cron.sync_backlogs()
     eq_(self.p.backlog_bugs.count(), 20)
Exemple #3
0
 def setUp(self):
     cache.clear()
     self.s = Sprint.objects.get(slug='2.2')
     self.p = Project.objects.get(pk=1)
     self.url = Project.objects.get(pk=1)
     scrum_cron.sync_backlogs()
Exemple #4
0
 def test_one_time_urls_deleted(self):
     url = BugzillaURL.objects.create(url=GOOD_BZ_URL, one_time=True)
     scrum_cron.sync_backlogs()
     with self.assertRaises(BugzillaURL.DoesNotExist):
         BugzillaURL.objects.get(id=url.id)
Exemple #5
0
 def test_recently_synced_urls_not_synced(self):
     hour_ago = datetime.utcnow() - timedelta(hours=1)
     url = BugzillaURL.objects.create(url=GOOD_BZ_URL, date_synced=hour_ago)
     scrum_cron.sync_backlogs()
     url = BugzillaURL.objects.get(id=url.id)
     eq_(url.date_synced, hour_ago)
Exemple #6
0
 def test_default_sync_date_urls_synced(self):
     """Test that BugzillaURL objects with NULL sync dates are synced."""
     BugzillaURL.objects.create(url=GOOD_BZ_URL, project=self.p)
     scrum_cron.sync_backlogs()
     eq_(self.p.backlog_bugs.count(), 20)
Exemple #7
0
 def setUp(self):
     cache.clear()
     self.s = Sprint.objects.get(slug='2.2')
     self.p = Project.objects.get(pk=1)
     self.url = Project.objects.get(pk=1)
     scrum_cron.sync_backlogs()
Exemple #8
0
 def test_one_time_urls_deleted(self):
     url = BugzillaURL.objects.create(url=GOOD_BZ_URL, one_time=True)
     scrum_cron.sync_backlogs()
     with self.assertRaises(BugzillaURL.DoesNotExist):
         BugzillaURL.objects.get(id=url.id)
Exemple #9
0
 def test_recently_synced_urls_not_synced(self):
     hour_ago = datetime.utcnow() - timedelta(hours=1)
     url = BugzillaURL.objects.create(url=GOOD_BZ_URL, date_synced=hour_ago)
     scrum_cron.sync_backlogs()
     url = BugzillaURL.objects.get(id=url.id)
     eq_(url.date_synced, hour_ago)
Exemple #10
0
 def test_default_sync_date_urls_synced(self):
     """Test that BugzillaURL objects with NULL sync dates are synced."""
     BugzillaURL.objects.create(url=GOOD_BZ_URL, project=self.p)
     scrum_cron.sync_backlogs()
     eq_(self.p.backlog_bugs.count(), 20)