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

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

src/d/j/django-cachebot-0.4.1/cachebot/tests/manager_tests.py   django-cachebot(Download)
    def test_get_or_create(self):
        obj, created = FirstModel.objects.get_or_create(text='new')
        self.assertEqual(created, True)
        time.sleep(conf.CACHE_INVALIDATION_TIMEOUT)
        obj = FirstModel.objects.get(text='new')

src/d/j/django-cachebot-HEAD/cachebot/tests/manager_tests.py   django-cachebot(Download)
    def test_get_or_create(self):
        obj, created = FirstModel.objects.get_or_create(text='new')
        self.assertEqual(created, True)
        time.sleep(conf.CACHE_INVALIDATION_TIMEOUT)
        obj = FirstModel.objects.get(text='new')