예제 #1
0
 def test_tag_no_from(self):
     tagger = (b'Joe Wong', b'*****@*****.**', 1234567890, -6 * 3600)
     c = commands.TagCommand(b'refs/tags/v1.0', None, tagger,
                             b'create v1.0')
     self.assertEqual(
         b"tag refs/tags/v1.0\n"
         b"tagger Joe Wong <*****@*****.**> 1234567890 -0600\n"
         b"data 11\n"
         b"create v1.0", bytes(c))
예제 #2
0
 def test_tag(self):
     # tagger tuple is (name, email, secs-since-epoch, secs-offset-from-utc)
     tagger = (b'Joe Wong', b'*****@*****.**', 1234567890, -6 * 3600)
     c = commands.TagCommand(b'refs/tags/v1.0', b':xxx', tagger,
                             b'create v1.0')
     self.assertEqual(
         b"tag refs/tags/v1.0\n"
         b"from :xxx\n"
         b"tagger Joe Wong <*****@*****.**> 1234567890 -0600\n"
         b"data 11\n"
         b"create v1.0", bytes(c))
예제 #3
0
 def _parse_tag(self, name):
     """Parse a tag command."""
     from_ = self._get_from(b'tag')
     tagger = self._get_user_info(b'tag', b'tagger', accept_just_who=True)
     message = self._get_data(b'tag', b'message')
     return commands.TagCommand(name, from_, tagger, message)