예제 #1
0
    def test_load_opml_no_duplicates(self):
        """
        Assert multiple calls to the load_opml creates no duplicates
        """
        self.assertEqual(Feed.objects.count(), 0)
        self.assertEqual(load_opml(FEEDLY), 36)
        self.assertEqual(Feed.objects.count(), 36)

        for _ in range(10):
            self.assertEqual(load_opml(FEEDLY), 0)
            self.assertEqual(Feed.objects.count(), 36)
예제 #2
0
파일: test_opml.py 프로젝트: youurt/baleen
    def test_load_opml_no_duplicates(self):
        """
        Assert multiple calls to the load_opml creates no duplicates
        """
        self.assertEqual(Feed.objects.count(), 0)
        self.assertEqual(load_opml(FEEDLY), 36)
        self.assertEqual(Feed.objects.count(), 36)

        for _ in xrange(10):
            self.assertEqual(load_opml(FEEDLY), 0)
            self.assertEqual(Feed.objects.count(), 36)
예제 #3
0
파일: load.py 프로젝트: lauralorenz/baleen
    def handle(self, args):
        # Connect to the database
        db.connect()

        # Load the OPML files into the database
        count = sum(load_opml(path) for path in args.opml)
        return "Ingested {} feeds from {} OPML files".format(count, len(args.opml))
예제 #4
0
    def handle(self, args):
        # Connect to the database
        db.connect()

        # Load the OPML files into the database
        count = sum(load_opml(path) for path in args.opml)
        return "Ingested {} feeds from {} OPML files".format(count, len(args.opml))
예제 #5
0
    def test_load_opml_integrated(self):
        """
        Test the integration of the ingest helper function
        """
        self.assertEqual(Feed.objects.count(), 0)
        self.assertEqual(load_opml(FEEDLY), 36)
        self.assertEqual(Feed.objects.count(), 36)

        for feed in Feed.objects():
            self.assertIn('xmlUrl', feed.urls)
            self.assertIn('htmlUrl', feed.urls)
예제 #6
0
파일: test_opml.py 프로젝트: youurt/baleen
    def test_load_opml_integrated(self):
        """
        Test the integration of the ingest helper function
        """
        self.assertEqual(Feed.objects.count(), 0)
        self.assertEqual(load_opml(FEEDLY), 36)
        self.assertEqual(Feed.objects.count(), 36)

        for feed in Feed.objects():
            self.assertIn('xmlUrl', feed.urls)
            self.assertIn('htmlUrl', feed.urls)