tests.test_utils¶
Location: Pulp Smash → API Documentation → tests.test_utils
Unit tests for pulp_smash.utils.
-
class
tests.test_utils.FipsIsEnabledTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest :func: pulp_smash.utils.fips_is_enabled.
-
test_return_false()¶ Assert false if the crypto.fips_enabled is not enabled in sysctl.
-
test_return_true()¶ Assert true if the crypto.fips_enabled is enabled in sysctl.
-
-
class
tests.test_utils.FipsIsSupportedtestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest :func: pulp_smash.utils.fips_is_supported.
-
test_return_false()¶ Assert false if Called process Error Exception is thrown.
-
test_return_true()¶ Assert true if the crypto.fips_enabled is supported by sysctl.
-
-
class
tests.test_utils.GetOsReleaseTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest the
get_os_release_*functions.These tests are very simple: they just make sure that the string returned by the used
pulp_smash.cli.Clientobject is stripped and returned.-
test_get_os_release_id()¶
-
test_get_os_release_version_id()¶
-
-
class
tests.test_utils.GetSha256ChecksumTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest
pulp_smash.utils.get_sha256_checksum().-
test_all()¶ Call the function three times, with two URLs.
Call the function with the first URL, the second URL and the first URL again. Verify that:
- No download is attempted during the third call.
- The first and second calls return different checksums.
- The first and third calls return identical checksums.
-
-
class
tests.test_utils.IsRootTestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest
pulp_smash.cli.is_root.-
test_false()¶ Assert the method returns
Falsewhen non-root.
-
test_true()¶ Assert the method returns
Truewhen root.
-
-
class
tests.test_utils.UUID4TestCase(methodName='runTest')¶ Bases:
unittest.case.TestCaseTest
pulp_smash.utils.uuid4().-
test_type()¶ Assert the method returns a unicode string.
-