Skip to content

Commit

Permalink
tests: Fix imports to tests/assertions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hartwork committed Dec 10, 2023
1 parent cebdd45 commit ecb5d84
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 8 deletions.
Empty file added tests/__init__.py
Empty file.
3 changes: 2 additions & 1 deletion tests/integration/test_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
from urllib.request import Request, urlopen

import pytest
from assertions import assert_cassette_has_one_response, assert_is_json_bytes

import vcr

from ..assertions import assert_cassette_has_one_response, assert_is_json_bytes


def _request_with_auth(url, username, password):
request = Request(url)
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_httplib2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

import pytest
import pytest_httpbin.certs
from assertions import assert_cassette_has_one_response

import vcr

from ..assertions import assert_cassette_has_one_response

httplib2 = pytest.importorskip("httplib2")


Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_requests.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Test requests' interaction with vcr"""
import pytest
from assertions import assert_cassette_empty, assert_is_json_bytes

import vcr

from ..assertions import assert_cassette_empty, assert_is_json_bytes

requests = pytest.importorskip("requests")


Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import json
import zlib

from assertions import assert_is_json_bytes

import vcr

from ..assertions import assert_is_json_bytes


def _headers_are_case_insensitive(host, port):
conn = httplib.HTTPConnection(host, port)
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_tornado.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import json

import pytest
from assertions import assert_cassette_empty, assert_is_json_bytes

import vcr
from vcr.errors import CannotOverwriteExistingCassetteException

from ..assertions import assert_cassette_empty, assert_is_json_bytes

tornado = pytest.importorskip("tornado")
http = pytest.importorskip("tornado.httpclient")

Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_urllib2.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
from urllib.request import urlopen

import pytest_httpbin.certs
from assertions import assert_cassette_has_one_response
from pytest import mark

# Internal imports
import vcr

from ..assertions import assert_cassette_has_one_response


def urlopen_with_cafile(*args, **kwargs):
context = ssl.create_default_context(cafile=pytest_httpbin.certs.where())
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_urllib3.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

import pytest
import pytest_httpbin
from assertions import assert_cassette_empty, assert_is_json_bytes

import vcr
from vcr.patch import force_reset
from vcr.stubs.compat import get_headers

from ..assertions import assert_cassette_empty, assert_is_json_bytes

urllib3 = pytest.importorskip("urllib3")


Expand Down

0 comments on commit ecb5d84

Please sign in to comment.