pulp_2_tests.tests.platform.api_v2.test_login

Location: Pulp 2 TestsTestspulp_2_tests.tests.platform.api_v2.test_login

Test the API’s authentication functionality.

class pulp_2_tests.tests.platform.api_v2.test_login.LoginTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Tests for logging in.

test_failure()

Unsuccessfully log in to the server.

Assert that:

  • The response has an HTTP 401 status code.
  • The response body is valid JSON and has correct keys.
test_success()

Successfully log in to the server.

Assert that:

  • The response has an HTTP 200 status code.
  • The response body is valid JSON and has correct keys.