diff --git a/test-requirements.txt b/test-requirements.txt index 6c2e2138..9810c2d4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -14,5 +14,4 @@ testscenarios>=0.4 # Apache-2.0/BSD testtools>=1.4.0 # MIT mock>=2.0 # BSD httplib2>=0.7.5 # MIT -pycrypto>=2.6 # Public Domain reno!=2.3.1,>=1.8.0 # Apache-2.0 diff --git a/troveclient/tests/test_modules.py b/troveclient/tests/test_modules.py index 9decb6bf..9dec4165 100644 --- a/troveclient/tests/test_modules.py +++ b/troveclient/tests/test_modules.py @@ -14,8 +14,8 @@ # under the License. # -import Crypto.Random import mock +import os import testtools from troveclient.v1 import modules @@ -55,7 +55,7 @@ class TestModules(testtools.TestCase): return path, body, mod text_contents = "my_contents" - binary_contents = Crypto.Random.new().read(20) + binary_contents = os.urandom(20) for contents in [text_contents, binary_contents]: self.modules._create = mock.Mock(side_effect=side_effect_func) path, body, mod = self.modules.create( diff --git a/troveclient/tests/test_utils.py b/troveclient/tests/test_utils.py index aa47d218..5de10d57 100644 --- a/troveclient/tests/test_utils.py +++ b/troveclient/tests/test_utils.py @@ -15,7 +15,6 @@ # License for the specific language governing permissions and limitations # under the License. -import Crypto.Random import os import tempfile import testtools @@ -55,8 +54,8 @@ class UtilsTest(testtools.TestCase): text_data_bytes = bytes('This is a byte stream', 'utf-8') except TypeError: text_data_bytes = bytes('This is a byte stream') - random_data_str = Crypto.Random.new().read(12) - random_data_bytes = bytearray(Crypto.Random.new().read(12)) + random_data_str = os.urandom(12) + random_data_bytes = bytearray(os.urandom(12)) special_char_str = '\x00\xFF\x00\xFF\xFF\x00' special_char_bytes = bytearray( [ord(item) for item in special_char_str])