Пример #1
0
 def test_getItems_revisions(self):
     # If there are revisions in branches for the project, these are
     # returned in the feeds items.
     product = self.factory.makeProduct()
     branch, revision = self._createBranchWithRevision(product)
     feed = self._createFeed(product)
     [item] = feed.getItems()
     self.assertEqual(revision_feed_id(revision), item.id)
Пример #2
0
 def test_getItems_revisions(self):
     # If there are revisions in branches for the project, these are
     # returned in the feeds items.
     product = self.factory.makeProduct()
     branch, revision = self._createBranchWithRevision(product)
     feed = self._createFeed(product)
     [item] = feed.getItems()
     self.assertEqual(revision_feed_id(revision), item.id)
Пример #3
0
 def test_format(self):
     # The id contains the iso format of the date part of the revision
     # date, and the revision id.
     revision_date = datetime(2009, 7, 21, 12, tzinfo=UTC)
     revision = self.factory.makeRevision(revision_date=revision_date,
                                          rev_id="test_revision_id")
     feed_id = revision_feed_id(revision)
     self.assertEqual(
         'tag:launchpad.net,2009-07-21:/revision/test_revision_id', feed_id)
Пример #4
0
 def test_format(self):
     # The id contains the iso format of the date part of the revision
     # date, and the revision id.
     revision_date = datetime(2009, 07, 21, 12, tzinfo=UTC)
     revision = self.factory.makeRevision(
         revision_date=revision_date, rev_id="test_revision_id")
     feed_id = revision_feed_id(revision)
     self.assertEqual(
         'tag:launchpad.net,2009-07-21:/revision/test_revision_id',
         feed_id)