Example #1
0
 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'])
Example #2
0
 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'])
Example #3
0
def batch(request):
    key = settings.NUDGE_KEY.decode('hex')
    result = process_batch(key, request.POST['batch'], request.POST['iv'])
    return HttpResponse(result)
Example #4
0
 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'])
Example #5
0
 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'])
Example #6
0
 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'])
Example #7
0
def batch(request):
    key = settings.NUDGE_KEY.decode('hex')
    result = server.process_batch(key, request.POST['batch'], request.POST['iv'])
    return HttpResponse(result)