/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tests/test_mapping.py

Update to newer version of Dulwich, saner branch names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        c.commit_timezone = 60 * 5
82
82
        c.author_timezone = 60 * 3
83
83
        c.author = "Author"
84
 
        c.serialize()
85
84
        rev = BzrGitMappingv1().import_commit(c)
86
85
        self.assertEquals("Some message", rev.message)
87
86
        self.assertEquals("Committer", rev.committer)
103
102
        c.author_timezone = 60 * 3
104
103
        c.author = u"Authér".encode("iso8859-1")
105
104
        c.encoding = "iso8859-1"
106
 
        c.serialize()
107
105
        rev = BzrGitMappingv1().import_commit(c)
108
106
        self.assertEquals(u"Authér", rev.properties['author'])
109
107
        self.assertEquals("iso8859-1", rev.properties["git-explicit-encoding"])
119
117
        c.commit_timezone = 60 * 5
120
118
        c.author_timezone = 60 * 3
121
119
        c.author = u"Authér".encode("latin1")
122
 
        c.serialize()
123
120
        rev = BzrGitMappingv1().import_commit(c)
124
121
        self.assertEquals(u"Authér", rev.properties['author'])
125
122
        self.assertEquals("latin1", rev.properties["git-implicit-encoding"])
135
132
        c.commit_timezone = 60 * 5
136
133
        c.author_timezone = 60 * 3
137
134
        c.author = u"Authér".encode("utf-8")
138
 
        c.serialize()
139
135
        rev = BzrGitMappingv1().import_commit(c)
140
136
        self.assertEquals(u"Authér", rev.properties['author'])
141
137
        self.assertTrue("git-explicit-encoding" not in rev.properties)
155
151
        raise NotImplementedError(self.assertRoundtripBlob)
156
152
 
157
153
    def assertRoundtripCommit(self, commit1):
158
 
        commit1.serialize()
159
154
        rev = self.mapping.import_commit(commit1)
160
155
        commit2 = self.mapping.export_commit(rev, "12341212121212", None)
161
156
        self.assertEquals(commit1.committer, commit2.committer)