Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

src/d/j/django-cachepurge-0.3/django_cachepurge/tests/__init__.py   django-cachepurge(Download)
        # create
        content = testingmodels.UrlModel(title=u'model with url')
        content.save()
        self.assertEquals(sorted(django_cachepurge.get_urls()),
                          ['/content/1', '/some/related/url'])
        content.title = u'edited title'
        self.assertEquals(django_cachepurge.get_urls(), set())
        content.save()
        self.assertEquals(sorted(django_cachepurge.get_urls()),
                          ['/content/1', '/some/related/url'])
    def test_middleware(self):
        content = testingmodels.UrlModel(title=u'model with url')
        content.save()
        django_cachepurge.clear_urls()
        self.client.post('/content/1/edit', {'title': u'edited by web request'})
                                 'http://localhost:8888')
        content = testingmodels.UrlModel(title=u'model with url')
        content.save()
        django_cachepurge.clear_urls()
        self.client.post('/content/1/edit', {'title': u'edited by web request'})