pulp_smash.tests.platform.api_v2.test_user

Location: Pulp SmashAPI Documentationpulp_smash.tests.platform.api_v2.test_user

Test the user API endpoints.

The assumptions explored in this module have the following dependencies:

It is possible to create a user.
├── It is impossible to create a duplicate user.
├── It is possible to read a user.
├── It is possible to update a user.
│   └── It is possible to search for a (updated) user.
└── It is possible to delete a user.
class pulp_smash.tests.platform.api_v2.test_user.CreateTestCase(methodName='runTest')

Establish that we can create users. No prior assumptions are made.

classmethod setUpClass()

Create several users.

Create one user with the minimum required attributes, and another with all available attributes.

test_attrs()

Assert that each user has the requested attributes.

test_password()

Assert that responses do not contain passwords.

test_status_code()

Assert that each response has an HTTP 201 status code.

class pulp_smash.tests.platform.api_v2.test_user.ReadUpdateDeleteTestCase(methodName='runTest')

Establish that we can read, update and delete users.

This test case assumes that the assertions in CreateTestCase are valid.

classmethod setUpClass()

Create three users and read, update and delete them respectively.

test_create_duplicate_user()

Verify one cannot create a user with a duplicate login.

test_password_not_in_response()

Ensure read and update responses do not contain a password.

Target https://bugzilla.redhat.com/show_bug.cgi?id=1020300.

test_status_code()

Ensure read, update and delete responses have 200 status codes.

test_updated_user()

Assert the updated user has the assigned attributes.

test_updated_user_password()

Assert one can log in with a user with an updated password.

test_use_deleted_user()

Assert one cannot read, update or delete a deleted user.

class pulp_smash.tests.platform.api_v2.test_user.SearchTestCase(methodName='runTest')

Establish we can search for users.

This test case assumes the assertions in ReadUpdateDeleteTestCase are valid.

classmethod setUpClass()

Create a user and add it to the ‘super-users’ role.

Search for:

  • Nothing at all:
  • All users having only the super-users role.
  • All users having no roles.
  • A user by their login.
  • A non-existent user by their login.

Assert the global search includes our user.

test_login_filter_exclusion()

Search for a non-existent user via the “login” filter.

test_login_filter_inclusion()

Search for a user via the “login” filter.

test_roles_filter_exclusion()

Assert that the “roles” filter can be used for exclusion.

test_roles_filter_inclusion()

Assert that the “roles” filter can be used for inclusion.

test_status_codes()

Assert each response has an HTTP 200 status code.