Beispiel #1
0
 def test_update_refs_error(self):
     parser = ReportStatusParser()
     parser.handle_packet(b"unpack ok")
     parser.handle_packet(b"ng refs/foo/bar need to pull")
     parser.handle_packet(None)
     self.assertEqual(
         [(b'refs/foo/bar', 'need to pull')], list(parser.check()))
Beispiel #2
0
 def test_ok(self):
     parser = ReportStatusParser()
     parser.handle_packet(b"unpack ok")
     parser.handle_packet(b"ok refs/foo/bar")
     parser.handle_packet(None)
     parser.check()
Beispiel #3
0
 def test_update_refs_error(self):
     parser = ReportStatusParser()
     parser.handle_packet(b"unpack ok")
     parser.handle_packet(b"ng refs/foo/bar need to pull")
     parser.handle_packet(None)
     self.assertRaises(UpdateRefsError, parser.check)
Beispiel #4
0
 def test_invalid_pack(self):
     parser = ReportStatusParser()
     parser.handle_packet(b"unpack error - foo bar")
     parser.handle_packet(b"ok refs/foo/bar")
     parser.handle_packet(None)
     self.assertRaises(SendPackError, parser.check)
Beispiel #5
0
 def test_ok(self):
     parser = ReportStatusParser()
     parser.handle_packet("unpack ok")
     parser.handle_packet("ok refs/foo/bar")
     parser.handle_packet(None)
     parser.check()
Beispiel #6
0
 def test_update_refs_error(self):
     parser = ReportStatusParser()
     parser.handle_packet("unpack ok")
     parser.handle_packet("ng refs/foo/bar need to pull")
     parser.handle_packet(None)
     self.assertRaises(UpdateRefsError, parser.check)
Beispiel #7
0
 def test_invalid_pack(self):
     parser = ReportStatusParser()
     parser.handle_packet("unpack error - foo bar")
     parser.handle_packet("ok refs/foo/bar")
     parser.handle_packet(None)
     self.assertRaises(SendPackError, parser.check)
Beispiel #8
0
 def test_ok(self):
     parser = ReportStatusParser()
     parser.handle_packet(b"unpack ok")
     parser.handle_packet(b"ok refs/foo/bar")
     parser.handle_packet(None)
     self.assertEqual([(b'refs/foo/bar', None)], list(parser.check()))