Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalimaha committed May 28, 2017
1 parent 65ebf28 commit 0e31df8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
7 changes: 7 additions & 0 deletions pact_test/constants/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
MISSING_STATE = 'Missing implementation for state '
MISSING_PACT_HELPER = 'Missing "pact_helper.py" at "'
MISSING_PACT_URI = 'Missing setup for "pact_uri" at '
MISSING_TESTS = 'There are no consumer tests to verify.'
MISSING_SETUP = 'Missing "setup" method in "pact_helper.py".'
MISSING_HAS_PACT_WITH = 'Missing setup for "has_pact_with" at '
MISSING_TEAR_DOWN = 'Missing "tear_down" method in "pact_helper.py".'
5 changes: 1 addition & 4 deletions pact_test/models/service_consumer_test.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from pact_test.constants import *
from pact_test.exceptions import PactTestException


MISSING_PACT_URI = 'Missing setup for "pact_uri" at '
MISSING_HAS_PACT_WITH = 'Missing setup for "has_pact_with" at '


class ServiceConsumerTest(object):
pact_uri = None
has_pact_with = None
Expand Down
8 changes: 1 addition & 7 deletions pact_test/runners/consumer_tests_runner.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import os
import imp
import inspect
from pact_test.constants import *
from pact_test.exceptions import PactTestException
from pact_test.utils.pact_utils import get_pact


MISSING_PACT_HELPER = 'Missing "pact_helper.py" at "'
MISSING_TESTS = 'There are no consumer tests to verify.'
MISSING_SETUP = 'Missing "setup" method in "pact_helper.py".'
MISSING_TEAR_DOWN = 'Missing "tear_down" method in "pact_helper.py".'
MISSING_STATE = 'Missing implementation for state '


class ConsumerTestsRunner(object):
pact_helper = None

Expand Down
8 changes: 4 additions & 4 deletions pact_test/utils/pact_utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import json
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
try: # pragma: no cover
from urllib.request import urlopen # pragma: no cover
except ImportError: # pragma: no cover
from urllib import urlopen # pragma: no cover


def get_pact(location):
Expand Down

0 comments on commit 0e31df8

Please sign in to comment.