Skip to content

Commit

Permalink
Remove spec=Draft4Validator from mock_validator as mock>=4 does not a…
Browse files Browse the repository at this point in the history
…llow instanciating it otherwise
  • Loading branch information
macisamuele committed Feb 7, 2020
1 parent 9c20a25 commit 8004f5b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/swagger20_validator/ref_validator_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
import pytest
from jsonschema.validators import Draft4Validator
from jsonschema.validators import RefResolver
from mock import MagicMock
from mock import Mock
Expand Down Expand Up @@ -64,7 +63,7 @@ def annotated_scope():

@pytest.fixture
def mock_validator(original_scope):
validator = Mock(spec=Draft4Validator)
validator = Mock()
validator.resolver = Mock(spec=RefResolver)
validator.resolver._scopes_stack = original_scope
# Make descend() return an empty list to StopIteration.
Expand Down

0 comments on commit 8004f5b

Please sign in to comment.