コード例 #1
0
ファイル: tests.py プロジェクト: mjumbewu/subscribe.me
    def test_causes_the_same_feed_record_to_be_returned_on_different_calls_to_getRecord (self):
        library = FeedLibrary(shared=False)
        library.register(ListItemFeed, 'li')

        feed = ListItemFeed('[1, 2, 3]')
        record = library.get_record(feed)

        self.assertIs(record, library.get_record(feed))
コード例 #2
0
ファイル: tests.py プロジェクト: mjumbewu/subscribe.me
    def test_doesnt_return_the_same_record_from_different_libraries (self):
        library1 = FeedLibrary(shared=False)
        library1.register(ListItemFeed, 'li')

        library2 = FeedLibrary(shared=False)
        library2.register(ListItemFeed, 'li')

        feed = ListItemFeed('[1, 2, 3]')
        record = library1.get_record(feed)

        self.assertIsNot(record, library2.get_record(feed))