From fdb1dc77a45a26d8eac9f8b53f4d9200f54f7efe Mon Sep 17 00:00:00 2001 From: Uri Baghin Date: Sun, 29 Sep 2019 00:57:10 +1000 Subject: Parse rejected deletes. --- git/test/test_remote.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'git/test/test_remote.py') diff --git a/git/test/test_remote.py b/git/test/test_remote.py index e87b60df..77e3ffbf 100644 --- a/git/test/test_remote.py +++ b/git/test/test_remote.py @@ -385,6 +385,14 @@ class TestRemote(TestBase): progress.make_assertion() self._do_test_push_result(res, remote) + # rejected stale delete + force_with_lease = "%s:0000000000000000000000000000000000000000" % new_head.path + res = remote.push(":%s" % new_head.path, force_with_lease=force_with_lease) + self.assertTrue(res[0].flags & PushInfo.ERROR) + self.assertTrue(res[0].flags & PushInfo.REJECTED) + self.assertIsNone(res[0].local_ref) + self._do_test_push_result(res, remote) + # delete new branch on the remote end and locally res = remote.push(":%s" % new_head.path) self._do_test_push_result(res, remote) -- cgit v1.2.3