mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 19:02:57 +00:00
22 lines
796 B
Diff
22 lines
796 B
Diff
diff --git a/tests/test_setup.py b/tests/test_setup.py
|
|
index 085b110..ea4a7d2 100644
|
|
--- a/tests/test_setup.py
|
|
+++ b/tests/test_setup.py
|
|
@@ -45,7 +45,8 @@ class SetupDbAndCredentials:
|
|
return self
|
|
|
|
def __exit__(self, exc_type=None, exc_value=None, traceback=None):
|
|
- self.gp.google_photos_down.close()
|
|
+ if hasattr(self.gp, 'google_photos_down'):
|
|
+ self.gp.google_photos_down.close()
|
|
|
|
def test_setup(self, test_name, args=None, trash_db=False, trash_files=False):
|
|
self.root = Path("/tmp/gpTests/{}".format(test_name))
|
|
@@ -76,3 +77,6 @@ class SetupDbAndCredentials:
|
|
|
|
def test_done(self):
|
|
self.gp.data_store.store()
|
|
+
|
|
+import pytest, requests
|
|
+requests.Session.__init__ = lambda *args, **kwargs: pytest.skip("no network access")
|