/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_commands.py

  • Committer: Ian Clatworthy
  • Date: 2009-08-27 04:39:25 UTC
  • mto: (0.64.232 trunk)
  • mto: This revision was merged to the branch mainline in revision 6631.
  • Revision ID: ian.clatworthy@canonical.com-20090827043925-u2vqqetrjboqsmov
Definition and formatting of multiple authors and revision properties

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
            "blah blah blah",
155
155
            repr(c))
156
156
 
 
157
    def test_commit_with_more_authors(self):
 
158
        # user tuple is (name, email, secs-since-epoch, secs-offset-from-utc)
 
159
        author = ('Sue Wong', 'sue@example.com', 1234565432, -6 * 3600)
 
160
        committer = ('Joe Wong', 'joe@example.com', 1234567890, -6 * 3600)
 
161
        more_authors = [
 
162
            ('Al Smith', 'al@example.com', 1234565432, -6 * 3600),
 
163
            ('Bill Jones', 'bill@example.com', 1234565432, -6 * 3600),
 
164
            ]
 
165
        c = commands.CommitCommand("refs/heads/master", "bbb", author,
 
166
            committer, "release v1.0", ":aaa", None, None, more_authors)
 
167
        self.assertEqualDiff(
 
168
            "commit refs/heads/master\n"
 
169
            "mark :bbb\n"
 
170
            "author Sue Wong <sue@example.com> 1234565432 -0600\n"
 
171
            "author Al Smith <al@example.com> 1234565432 -0600\n"
 
172
            "author Bill Jones <bill@example.com> 1234565432 -0600\n"
 
173
            "committer Joe Wong <joe@example.com> 1234567890 -0600\n"
 
174
            "data 12\n"
 
175
            "release v1.0\n"
 
176
            "from :aaa",
 
177
            repr(c))
 
178
 
 
179
    def test_commit_with_properties(self):
 
180
        # user tuple is (name, email, secs-since-epoch, secs-offset-from-utc)
 
181
        committer = ('Joe Wong', 'joe@example.com', 1234567890, -6 * 3600)
 
182
        properties = {
 
183
            u'greeting':  u'hello',
 
184
            u'planet':    u'world',
 
185
            }
 
186
        c = commands.CommitCommand("refs/heads/master", "bbb", None,
 
187
            committer, "release v1.0", ":aaa", None, None, None, properties)
 
188
        self.assertEqualDiff(
 
189
            "commit refs/heads/master\n"
 
190
            "mark :bbb\n"
 
191
            "committer Joe Wong <joe@example.com> 1234567890 -0600\n"
 
192
            "data 12\n"
 
193
            "release v1.0\n"
 
194
            "from :aaa\n"
 
195
            "properties 2\n"
 
196
            "name 8 greeting\n"
 
197
            "value 5 hello\n"
 
198
            "name 6 planet\n"
 
199
            "value 5 world",
 
200
            repr(c))
 
201
 
157
202
 
158
203
class TestFeatureDisplay(tests.TestCase):
159
204