diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-12-31 13:32:50 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-12-31 13:32:50 -0600 |
commit | 77389ac83db5a04e173fce52170dd8d2003e5560 (patch) | |
tree | 05e6014d2757aa3eae6b71542e93a52f84c4a5aa /tests/hazmat/backends | |
parent | 6dc48243725eccfcb59c622e4b8ef1e74f3b3f67 (diff) | |
download | cryptography-77389ac83db5a04e173fce52170dd8d2003e5560.tar.gz cryptography-77389ac83db5a04e173fce52170dd8d2003e5560.tar.bz2 cryptography-77389ac83db5a04e173fce52170dd8d2003e5560.zip |
rename urandom engine to osrandom engine
Diffstat (limited to 'tests/hazmat/backends')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index 82832b10..3fabfe38 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -192,10 +192,10 @@ class TestOpenSSL(object): # This test is not in the next class because to check if it's really # default we don't want to run the setup_method before it - def test_urandom_engine_is_default(self): + def test_osrandom_engine_is_default(self): e = backend.lib.ENGINE_get_default_RAND() name = backend.lib.ENGINE_get_name(e) - assert name == backend.lib.Cryptography_urandom_engine_name + assert name == backend.lib.Cryptography_osrandom_engine_name res = backend.lib.ENGINE_free(e) assert res == 1 @@ -211,78 +211,78 @@ class TestOpenSSLRandomEngine(object): # we need to reset state to being default. backend is a shared global # for all these tests. unregister_dummy_engine() - backend.register_urandom_engine() + backend.register_osrandom_engine() current_default = backend.lib.ENGINE_get_default_RAND() name = backend.lib.ENGINE_get_name(current_default) - assert name == backend.lib.Cryptography_urandom_engine_name + assert name == backend.lib.Cryptography_osrandom_engine_name - def test_register_urandom_already_default(self): + def test_register_osrandom_already_default(self): e = backend.lib.ENGINE_get_default_RAND() name = backend.lib.ENGINE_get_name(e) - assert name == backend.lib.Cryptography_urandom_engine_name + assert name == backend.lib.Cryptography_osrandom_engine_name res = backend.lib.ENGINE_free(e) assert res == 1 - backend.register_urandom_engine() + backend.register_osrandom_engine() e = backend.lib.ENGINE_get_default_RAND() name = backend.lib.ENGINE_get_name(e) - assert name == backend.lib.Cryptography_urandom_engine_name + assert name == backend.lib.Cryptography_osrandom_engine_name res = backend.lib.ENGINE_free(e) assert res == 1 - def test_unregister_urandom_engine_nothing_registered(self): - backend.unregister_urandom_engine() + def test_unregister_osrandom_engine_nothing_registered(self): + backend.unregister_osrandom_engine() e = backend.lib.ENGINE_get_default_RAND() assert e == backend.ffi.NULL - backend.unregister_urandom_engine() + backend.unregister_osrandom_engine() e = backend.lib.ENGINE_get_default_RAND() assert e == backend.ffi.NULL - def test_unregister_urandom_engine(self): + def test_unregister_osrandom_engine(self): e = backend.lib.ENGINE_get_default_RAND() assert e != backend.ffi.NULL name = backend.lib.ENGINE_get_name(e) - assert name == backend.lib.Cryptography_urandom_engine_name + assert name == backend.lib.Cryptography_osrandom_engine_name res = backend.lib.ENGINE_free(e) assert res == 1 - backend.unregister_urandom_engine() + backend.unregister_osrandom_engine() e = backend.lib.ENGINE_get_default_RAND() assert e == backend.ffi.NULL - def test_register_urandom_no_default(self): - backend.unregister_urandom_engine() + def test_register_osrandom_no_default(self): + backend.unregister_osrandom_engine() e = backend.lib.ENGINE_get_default_RAND() assert e == backend.ffi.NULL - backend.register_urandom_engine() + backend.register_osrandom_engine() e = backend.lib.ENGINE_get_default_RAND() name = backend.lib.ENGINE_get_name(e) - assert name == backend.lib.Cryptography_urandom_engine_name + assert name == backend.lib.Cryptography_osrandom_engine_name res = backend.lib.ENGINE_free(e) assert res == 1 - def test_unregister_urandom_other_engine_default(self): + def test_unregister_osrandom_other_engine_default(self): register_dummy_engine() default = backend.lib.ENGINE_get_default_RAND() default_name = backend.lib.ENGINE_get_name(default) assert default_name == dummy_engine.Cryptography_faux_engine_name res = backend.lib.ENGINE_finish(default) assert res == 1 - backend.unregister_urandom_engine() + backend.unregister_osrandom_engine() current_default = backend.lib.ENGINE_get_default_RAND() name = backend.lib.ENGINE_get_name(current_default) assert name == dummy_engine.Cryptography_faux_engine_name res = backend.lib.ENGINE_finish(current_default) assert res == 1 - def test_register_urandom_other_engine_default(self): + def test_register_osrandom_other_engine_default(self): register_dummy_engine() default = backend.lib.ENGINE_get_default_RAND() default_name = backend.lib.ENGINE_get_name(default) assert default_name == dummy_engine.Cryptography_faux_engine_name res = backend.lib.ENGINE_finish(default) assert res == 1 - backend.register_urandom_engine() + backend.register_osrandom_engine() current_default = backend.lib.ENGINE_get_default_RAND() name = backend.lib.ENGINE_get_name(current_default) - assert name == backend.lib.Cryptography_urandom_engine_name + assert name == backend.lib.Cryptography_osrandom_engine_name res = backend.lib.ENGINE_finish(current_default) assert res == 1 |