Did I find the right examples for you? yes no

All Samples(96)  |  Call(96)  |  Derive(0)  |  Import(0)

src/f/e/feedhq-HEAD/tests/test_fetching.py   feedhq(Download)
    def test_parse_error(self, get):
        get.side_effect = LocationParseError("Failed to parse url")
        FeedFactory.create()
        unique = UniqueFeed.objects.get()
        self.assertTrue(unique.muted)
    def test_decode_error(self, get):
        get.side_effect = DecodeError("Received response with content-encoding"
                                      ": gzip, but failed to decode it.")
        FeedFactory.create()
        unique = UniqueFeed.objects.get()
    def test_incomplete_read(self, get):
        get.side_effect = IncompleteRead("0 bytes read")
        FeedFactory.create()
        f = UniqueFeed.objects.get()
        self.assertFalse(f.muted)
    def test_socket_timeout(self, get):
        m = get.return_value
        type(m).content = PropertyMock(side_effect=socket.timeout)
        FeedFactory.create()
        f = UniqueFeed.objects.get()
    def test_ctype(self, get):
        # Updatefeed doesn't fail if content-type is missing
        get.return_value = responses(200, 'sw-all.xml', headers={})
        feed = FeedFactory.create()
        update_feed(feed.url)

src/f/e/feedhq-HEAD/tests/test_feeds.py   feedhq(Download)
        response = self.app.get(url, user=user)
        self.assertContains(response, 'Getting started')
        FeedFactory.create(category__user=user, user=user)
        response = self.app.get(url)
        self.assertNotContains(response, 'Getting started')
    def test_only_unread(self, get):
        get.return_value = responses(304)
        user = UserFactory.create()
        category = CategoryFactory.create(user=user)
        FeedFactory.create(category=category, user=user)
    def test_feed(self, get):
        get.return_value = responses(304)
        user = UserFactory.create()
        feed = FeedFactory.create(category__user=user, user=user)
        url = reverse('feeds:feed', args=[feed.pk])
    def test_edit_feed(self, get):
        get.return_value = responses(304)
        user = UserFactory.create()
        feed = FeedFactory.create(user=user)
        url = reverse('feeds:edit_feed', args=[feed.pk])
    def test_delete_feed(self, get):
        get.return_value = responses(304)
 
        user = UserFactory.create()
        feed = FeedFactory.create(category__user=user, user=user)

src/f/e/feedhq-HEAD/tests/test_reader_api.py   feedhq(Download)
        self.assertEqual(response.json, {"subscriptions": []})
 
        feed = FeedFactory.create(category__user=user, user=user)
        EntryFactory.create(feed=feed, user=user,
                            date=timezone.now() - timedelta(days=365 * 150))
        })
 
        FeedFactory.create(category__user=user, user=user)
        FeedFactory.create(category=feed.category, user=user)
        FeedFactory.create(category=None, user=user)
        self.assertContains(response, 'false')
 
        FeedFactory.create(url=feed_url, category__user=user, user=user)
        response = self.client.get(url, {'s': 'feed/{0}'.format(feed_url)},
                                   **clientlogin(token))

src/f/e/feedhq-HEAD/tests/test_models.py   feedhq(Download)
    def test_feed_model(self, get):
        """Behaviour of the ``Feed`` model"""
        get.return_value = responses(200, 'rss20.xml')
        feed = FeedFactory.create(name='RSS test', url='rss20.xml',
                                  user__ttl=99999)
    def test_entry_model(self, get):
        get.return_value = responses(200, 'sw-all.xml')
        feed = FeedFactory.create()
        update_feed(feed.url)
        title = 'RE2: a principled approach to regular expression matching'
    def test_uniquefeed_model(self, get):
        get.return_value = responses(304)
        FeedFactory.create(url='http://example.com/' + 'foo/' * 200)
        unique = UniqueFeed.objects.get()
        self.assertEqual(len(unique.truncated_url()), 50)
 
        unique.delete()
 
        FeedFactory.create(url='http://example.com/foo/')
    def test_entry_model_behaviour(self, get):
        """Behaviour of the `Entry` model"""
        get.return_value = responses(304)
        feed = FeedFactory.create()
        entry = feed.entries.create(title='My title',

src/f/e/feedhq-HEAD/tests/test_update_queue.py   feedhq(Download)
    def test_add_missing(self, get):
        get.return_value = responses(304)
 
        feed = FeedFactory.create()
        FeedFactory.create(url=feed.url)
        FeedFactory.create(url=feed.url)
        FeedFactory.create()
    def test_updatefeeds_queuing(self, get):
        get.return_value = responses(304)
 
        for i in range(24):
            f = FeedFactory.create()

src/f/e/feedhq-HEAD/tests/test_favicons.py   feedhq(Download)
    def test_existing_favicon_new_feed(self, get):
        get.return_value = responses(304)
        FeedFactory.create(url='http://example.com/feed')
        self.assertEqual(Feed.objects.values_list('favicon', flat=True)[0], '')
 

src/d/j/django-feedreader-HEAD/feedreader/tests.py   django-feedreader(Download)
    def setUp(self):
        """Create data and login"""
        entry = EntryFactory.create()
        group = GroupFactory.create()
        feed = FeedFactory.create()
    def setUp(self):
        """Create data"""
        entry = EntryFactory.create()
        group = GroupFactory.create()
        feed = FeedFactory.create()

src/d/j/django-feedreader-0.9.4/feedreader/tests.py   django-feedreader(Download)
    def setUp(self):
        """Create data and login"""
        entry = EntryFactory.create()
        group = GroupFactory.create()
        feed = FeedFactory.create()
    def setUp(self):
        """Create data"""
        entry = EntryFactory.create()
        group = GroupFactory.create()
        feed = FeedFactory.create()