예제 #1
0
 def test_set_build_id_expires_in_the_serious_future(self, _cache):
     ten_years = 10 * 365.25 * 86400
     build_id = 'whatever'
     utils.set_spartacus_build_id(build_id)
     _cache.set.assert_called_with(self.cache_key,
                                   build_id,
                                   timeout=ten_years)
예제 #2
0
 def test_set_build_id_expires_in_the_serious_future(self, _cache):
     ten_years = 10 * 365.25 * 86400
     build_id = 'whatever'
     utils.set_spartacus_build_id(build_id)
     _cache.set.assert_called_with(self.cache_key,
                                   build_id,
                                   timeout=ten_years)
예제 #3
0
 def test_set_build_id_affects_get(self):
     build_id = 'some-other-build-id'
     utils.set_spartacus_build_id(build_id)
     eq_(utils.spartacus_build_id(), build_id)
예제 #4
0
 def test_set_build_id_affects_get(self):
     build_id = 'some-other-build-id'
     utils.set_spartacus_build_id(build_id)
     eq_(utils.spartacus_build_id(), build_id)
예제 #5
0
 def handle(self, build_id, *args, **options):
     set_spartacus_build_id(build_id)