Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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()
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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()
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)