def test_batch_with_deletion(self): delete_with_reversion(self.new_author) add_versions_to_batch(self.batch, changed_items()) serialized = serialize_batch(self.key.decode('hex'), self.batch) with self.assertRaises(ObjectDoesNotExist): process_batch(self.key.decode('hex'), serialized['batch'], serialized['iv'])
def batch(request): key = settings.NUDGE_KEY.decode('hex') result = process_batch(key, request.POST['batch'], request.POST['iv']) return HttpResponse(result)
def test_batch_with_deletion(self): delete_with_reversion(self.new_author) add_versions_to_batch(self.batch, changed_items()) serialized= serialize_batch(self.key.decode('hex'),self.batch) with self.assertRaises(ObjectDoesNotExist): # because it doesn't exist anymore in this database processed_batch=process_batch(self.key.decode('hex'), serialized['batch'], serialized['iv'])
def test_batch_serialization_and_processing(self): add_versions_to_batch(self.batch, changed_items()) serialized= serialize_batch(self.key.decode('hex'),self.batch) processed_batch=process_batch(self.key.decode('hex'), serialized['batch'], serialized['iv'])
def test_batch_serialization_and_processing(self): add_versions_to_batch(self.batch, changed_items()) serialized = serialize_batch(self.key.decode('hex'), self.batch) process_batch(self.key.decode('hex'), serialized['batch'], serialized['iv'])
def batch(request): key = settings.NUDGE_KEY.decode('hex') result = server.process_batch(key, request.POST['batch'], request.POST['iv']) return HttpResponse(result)