Skip to content

Commit

Permalink
Tests Not Running?
Browse files Browse the repository at this point in the history
Doesn’t seem like Travis was actually running the tests, and hit some 2/3 issues along the way. Fingers crossed.

Signed-off-by: Geoffrey Wiseman <geoffrey.wiseman@codiform.com>
  • Loading branch information
geoffreywiseman committed Oct 29, 2018
1 parent b2296a3 commit d631a33
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ install:
- pip install .
script:
- python setup.py test
- pytest

matrix:
include:
Expand Down
7 changes: 6 additions & 1 deletion awswl/commands.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from __future__ import unicode_literals
from builtins import dict, str
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import str

import boto3
import botocore
Expand Down
8 changes: 7 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
import os
import pytest

Expand All @@ -9,7 +15,7 @@ def fixture_env_sgid():
sgid = "sg-12345"
os.environ[cli.AWSWL_SGID_KEY] = sgid
yield sgid
os.environ.unsetenv(cli.AWSWL_SGID_KEY)
del os.environ[cli.AWSWL_SGID_KEY]


def test_parse_empty_arguments():
Expand Down
6 changes: 5 additions & 1 deletion tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
import pytest

from moto import mock_ec2
from unittest.mock import patch
from argparse import Namespace
from awswl import commands
import os

try:
from unittest.mock import patch
except ImportError:
from mock import patch

AWS_DEFAULT_REGION = 'AWS_DEFAULT_REGION'


Expand Down
6 changes: 5 additions & 1 deletion tests/test_externalip.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
from awswl import externalip
from unittest.mock import patch
from argparse import Namespace

try:
from unittest.mock import patch
except ImportError:
from mock import patch


@patch('requests.get')
def test_get_externalip(get_method):
Expand Down

0 comments on commit d631a33

Please sign in to comment.