Previously, serialize() expected the object type to be numeric, and
authorDave Borowitz <dborowitz@google.com>
Thu, 1 Apr 2010 23:58:27 +0000 (01:58 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 1 Apr 2010 23:58:27 +0000 (01:58 +0200)
_parse_text() set it to be an object class. Surprisingly, there were
no code paths that perform a round-trip parse-serialize-parse or
serialize-parse-serialize on tags; put a TODO in test_objects.py to add
such tests.

dulwich/tests/test_objects.py

index 31d3a45..c5555a3 100644 (file)
@@ -20,6 +20,8 @@
 
 """Tests for git base objects."""
 
+# TODO: Round-trip parse-serialize-parse and serialize-parse-serialize tests.
+
 
 import os
 import stat
@@ -278,7 +280,7 @@ class TagSerializeTests(unittest.TestCase):
         x.tagger = "Jelmer Vernooij <jelmer@samba.org>"
         x.name = "0.1"
         x.message = "Tag 0.1"
-        x.object = (3, "d80c186a03f423a81b39df39dc87fd269736ca86")
+        x.object = (Blob, "d80c186a03f423a81b39df39dc87fd269736ca86")
         x.tag_time = 423423423
         x.tag_timezone = 0
         self.assertEquals("""object d80c186a03f423a81b39df39dc87fd269736ca86