Bladeren bron

test: Add pull test validating when remote_location is not passed

Sijis Aviles 5 jaren geleden
bovenliggende
commit
4e75bb1ced
1 gewijzigde bestanden met toevoegingen van 12 en 0 verwijderingen
  1. 12 0
      dulwich/tests/test_porcelain.py

+ 12 - 0
dulwich/tests/test_porcelain.py

@@ -1007,6 +1007,18 @@ class PullTests(PorcelainTestCase):
         with Repo(self.target_path) as r:
             self.assertEqual(r[b'HEAD'].id, self.repo[b'HEAD'].id)
 
+    def test_no_remote_location(self):
+        outstream = BytesIO()
+        errstream = BytesIO()
+
+        # Pull changes into the cloned repo
+        porcelain.pull(self.target_path, refspecs=b'refs/heads/master',
+                       outstream=outstream, errstream=errstream)
+
+        # Check the target repo for pushed changes
+        with Repo(self.target_path) as r:
+            self.assertEqual(r[b'HEAD'].id, self.repo[b'HEAD'].id)
+
 
 class StatusTests(PorcelainTestCase):