diff --git a/tests/support/usersupp.py b/tests/support/usersupp.py index 65a02fa4a..4fcf68413 100644 --- a/tests/support/usersupp.py +++ b/tests/support/usersupp.py @@ -38,6 +38,8 @@ TEST_USER_DN = '/C=DK/ST=NA/L=NA/O=Test Org/OU=NA/CN=Test User/emailAddress=test@example.com' +OTHER_USER_DN = '/C=DK/ST=NA/L=NA/O=Other Org/OU=NA/CN=Other User/emailAddress=other@example.com' +NO_SUCH_USER_DN = '/C=DK/ST=NA/L=NA/O=No Such Org/OU=NA/CN=No Such User/emailAddress=nosuchuser@example.com' _FIXTURE_NAME_BY_USER_DN = { TEST_USER_DN: 'MiG-users.db--example' @@ -120,6 +122,15 @@ def _provision_test_user_dirs(testcase, distinguished_name): with open(test_user_settings_file, 'wb') as outfile: pickle.dump({}, outfile) + # create the test user cache, resource pending and mrsl files sub dirs + for sub in (self.configuration.user_cache, + self.configuration.resource_pending, + self.configuration.mrsl_files_dir): + conf_user_sub = os.path.normpath(sub) + test_user_sub_dir = os.path.join( + conf_user_sub, test_client_dir_name) + os.makedirs(test_user_sub_dir) + return test_user_dir @staticmethod @@ -134,8 +145,8 @@ def _provision_test_users(testcase, *distinguished_names): that the user db will be populated from arbitrary data and thus the test dependent upon this is less strongly assured, but if (as is the expectation) the basic operations are validated with - "indenpdent" data i.e. conained within fixtures as opposed to - generated by logic that extended tests which need + "independent" data i.e. contained within fixtures as opposed to + generated by logic that extended tests will need. """ conf_user_db_home = UserAssertMixin._provision_user_db_dir(testcase)