Commit Graph

9 Commits

Author SHA1 Message Date
rallytime
3055e17ed5 Replace @mock_ec2 calls with @mock_ec2_deprecated calls
moto versions >= 1.0.0 have changed the way the mocked connections through
boto are handled with the @mock_ec2 decorator. They use the boto3 connection
method. However, since we are still using boto in many places, we need to use
the new @mock_ec2_deprecated decorator instead to handle the boto connection
functions for the unit tests.

Versions of moto < 1.0.0 are not Python 3 compatible, so salt-jenkins should
be installing newer versions of moto for those tests. Unfortunately, we cannot
install an older version of moto for Python2 that use the original @mock_ec2 call
and also import the @mock_ec2_deprecated function for newer versions of moto
simultaneously as the @mock_ec2_deprecated function doesn't exist in older
versions of moto.
2017-08-10 16:40:11 -04:00
rallytime
78cdee51d5 Gate boto_elb tests if proper version of moto isn't installed
For Python 2 tests, we can use an older version. But when running
these tests of Python 3, we need a newer version of moto that supports
Python 3.

This gates the tests if the expected version of moto is missing.
2017-07-11 17:00:50 -06:00
Mike Place
f04888d88f Remove unused import 2017-06-20 12:15:50 -06:00
Dmitry Kuzmenko
2cff18e2ef Py3: fix boto elb test 2017-06-20 16:59:38 +03:00
Pedro Algarvio
d397763553
Adjust to the new LoaderModuleMockMixin usage 2017-03-28 19:03:59 +01:00
Pedro Algarvio
ea81540cce
Code cleanup. Proper mocking. 2017-03-28 19:00:52 +01:00
Pedro Algarvio
40a64191a1
Absolute imports and A LOT of code cleanup. 2017-03-01 01:33:07 +00:00
Pedro Algarvio
3beb3fb801
Move whatever we need from salttesting to salt.
Let's drop the salttesting dependency cycle.
2017-02-28 22:52:49 +00:00
Pedro Algarvio
15af4c9728
Test filenames conformity. Adjust for pytest. 2017-02-23 23:19:42 +00:00