Commit Graph

14 Commits

Author SHA1 Message Date
Daniel Wallace
b9761971c2
fix moto version
Fixes saltstack/salt-jenkins#692
2018-01-13 15:01:14 -05:00
Daniel Wallace
0cd95d1cc6
fix test boto imports
Test boto imports are failing for some reason
2018-01-13 15:01:14 -05:00
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
Pedro Algarvio
9a11538b54
Stop using deprecated TestCase methods 2017-04-01 14:22:57 +01:00
Pedro Algarvio
d397763553
Adjust to the new LoaderModuleMockMixin usage 2017-03-28 19:03:59 +01:00
Pedro Algarvio
9b1e55aa85
Import the full module namespace to avoid import shadowing.
https://github.com/saltstack/salt/pull/39996#issuecomment-287857698
2017-03-28 19:02:47 +01:00
Pedro Algarvio
1f7a0aa65b
Proper mocking 2017-03-28 19:00:51 +01:00
Pedro Algarvio
b25b26e23d
Cleanup test attributes once finished 2017-03-28 19:00:51 +01:00
Pedro Algarvio
0b41b92d7d
Use salt.utils.versions instead of distutils.version 2017-03-08 19:22:33 +00:00
Pedro Algarvio
3ec0870ef6
Disable 3rd-party-module-not-gated 2017-03-06 14:42:31 +00: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
5576f6ed33
Gate it! 2017-02-23 23:19:42 +00:00
Pedro Algarvio
15af4c9728
Test filenames conformity. Adjust for pytest. 2017-02-23 23:19:42 +00:00