Exemplo n.º 1
0
 def test_file_serialisation(self):
     from mr.tennant.git import serialise_string, serialise_file
     
     hello_world = StringIO('hello world')
     serialised = serialise_file(hello_world)
     
     expected_serialised = serialise_string("hello world", file_type="blob")
     self.assertEqual(expected_serialised, serialised)
Exemplo n.º 2
0
 def test_object_serialisation(self):
     from mr.tennant.git import serialise_string
     
     serialised = serialise_string("hello world", file_type="blob")
     self.assertEqual(serialised, 'x\x01K\xca\xc9OR04d\xc8H\xcd\xc9\xc9W(\xcf/\xcaI\x01\x00={\x06~')