示例#1
0
 def dstore(self, request, store, secret_key):
     if request.param == 'hash':
         return HashDecorator(store)
     elif request.param == 'uuid':
         return self.ustore(store)
     elif request.param == 'hmac':
         return HMACDecorator(secret_key, store)
     elif request.param == 'prefix':
         return PrefixDecorator('SaMpLe_PrEfIX', store)
示例#2
0
 def test_copy_raises_not_implemented(self, store):
     with pytest.raises(NotImplementedError):
         HMACDecorator(b'secret', store).copy(u'src', u'dest')
示例#3
0
 def setUp(self):
     self.store = HMACDecorator('my_secret_key', DictStore())
示例#4
0
 def hmacstore(self, secret_key, store):
     return HMACDecorator(secret_key, store)