Quellcode durchsuchen

Ignore requests to localhosts for all tests

JoostSijm vor 4 Jahren
Ursprung
Commit
e4fd1ab90e
1 geänderte Dateien mit 9 neuen und 1 gelöschten Zeilen
  1. 9 1
      tests/conftest.py

+ 9 - 1
tests/conftest.py

@@ -5,15 +5,23 @@ import os
 import pytest
 from dotenv import load_dotenv
 
-from rival_regions_wrapper import RemoteAuthentication, LocalAuthentication, ApiWrapper
+from rival_regions_wrapper import LocalAuthentication, ApiWrapper
 
 
 load_dotenv()
 
+
 class MissingAuthenticationError(Exception):
     """Error for missing authentication"""
 
 
+@pytest.fixture(scope='module')
+def vcr(vcr):
+    """Set parameters vor VCR"""
+    vcr.ignore_localhost = True
+    return vcr
+
+
 @pytest.fixture(scope="module")
 def api_wrapper():
     """Set up wrapper before test"""