def test_negative_create_with_invalid_username(self): """Create User with invalid Username :id: 8bb53001-6377-49fe-a85c-f92204a5dea4 :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ invalid_names = ( '', 'space {0}'.format(gen_string('alpha')), gen_string('alpha', 101), gen_string('html') ) for invalid_name in invalid_names: with self.subTest(invalid_name): options = { 'auth-source-id': 1, 'login': invalid_name, 'mail': 'root@localhost', 'password': gen_string('alpha'), } self.logger.debug(str(options)) with self.assertRaisesRegex( CLIReturnCodeError, u'Could not create the user:' ): User.create(options)
def test_negative_create_with_invalid_username(self): """Create User with invalid Username :id: 8bb53001-6377-49fe-a85c-f92204a5dea4 :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ invalid_names = ( '', 'space {0}'.format(gen_string('alpha')), gen_string('alpha', 101), gen_string('html') ) for invalid_name in invalid_names: with self.subTest(invalid_name): options = { 'auth-source-id': 1, 'login': invalid_name, 'mail': 'root@localhost', 'password': gen_string('alpha'), } self.logger.debug(str(options)) with self.assertRaisesRegex( CLIReturnCodeError, u'Could not create the user:' ): User.create(options)
def test_negative_create_with_invalid_username(self): """Create User with invalid Username @id: 8bb53001-6377-49fe-a85c-f92204a5dea4 @Assert: User is not created. Appropriate error shown. """ invalid_names = ( '', 'space {0}'.format(gen_string('alpha')), gen_string('alpha', 101), gen_string('html') ) for invalid_name in invalid_names: with self.subTest(invalid_name): options = { 'auth-source-id': 1, 'login': invalid_name, 'mail': 'root@localhost', 'password': gen_string('alpha'), } self.logger.debug(str(options)) with self.assertRaises(CLIReturnCodeError) as raise_ctx: User.create(options) self.assert_error_msg( raise_ctx, u'Could not create the user:' )
def test_negative_create_user_1(self): """@Test: Create User with invalid Username @Feature: User - Negative Create @Steps: 1. Create User for all invalid Usernames in [2] using valid First Name, Surname, Email Address, Language, authorized by @Assert: User is not created. Appropriate error shown. """ for invalid_name in ('', 'space {0}'.format(gen_string('alpha')), gen_string('alpha', 101), gen_string('html')): with self.subTest(invalid_name): options = { 'auth-source-id': 1, 'login': invalid_name, 'mail': 'root@localhost', 'password': gen_string('alpha'), } self.logger.debug(str(options)) with self.assertRaises(CLIReturnCodeError): UserObj.create(options)
def test_negative_create_with_blank_authorized_by(self): """Create User with blank Authorized by @Feature: User - Negative Create @Assert: User is not created. Appropriate error shown. """ with self.assertRaises(CLIReturnCodeError): User.create({ 'auth-source-id': '', 'login': gen_string('alpha'), 'mail': 'root@localhost', })
def test_negative_create_with_blank_authorized_by(self): """Create User with blank Authorized by @Feature: User - Negative Create @Assert: User is not created. Appropriate error shown. """ with self.assertRaises(CLIReturnCodeError): User.create({ 'auth-source-id': '', 'login': gen_string('alpha'), 'mail': 'root@localhost', })
def test_negative_create_with_blank_authorized_by(self): """Create User with blank Authorized by @id: 1f60fbf8-a5f0-432e-9b4e-60bc0224294a @Assert: User is not created. Appropriate error shown. """ with self.assertRaises(CLIReturnCodeError): User.create({ 'auth-source-id': '', 'login': gen_string('alpha'), 'mail': 'root@localhost', })
def test_negative_create_with_blank_authorized_by(self): """Create User with blank Authorized by @id: 1f60fbf8-a5f0-432e-9b4e-60bc0224294a @Assert: User is not created. Appropriate error shown. """ with self.assertRaises(CLIReturnCodeError) as raise_ctx: User.create({ 'auth-source-id': '', 'login': gen_string('alpha'), 'mail': 'root@localhost', }) self.assert_error_msg(raise_ctx, u'Could not create the user:')
def test_negative_create_with_blank_authorized_by(self): """Create User with blank Authorized by :id: 1f60fbf8-a5f0-432e-9b4e-60bc0224294a :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ with self.assertRaisesRegex(CLIReturnCodeError, u'Could not create the user:'******'auth-source-id': '', 'login': gen_string('alpha'), 'mail': 'root@localhost', })
def test_negative_create_with_blank_authorized_by_full(self): """Create User with blank Authorized by but having matching values in Password and verify fields and using valid Username, First Name, Surname, Email Address, Language @id: 4b142a12-8354-437e-89cc-c0505bda2027 @Assert: User is not created. Appropriate error shown. """ with self.assertRaises(CLIReturnCodeError): User.create({ 'auth-source-id': '', 'login': gen_string('alpha'), 'mail': 'root@localhost', 'password': gen_string('alpha'), })
def test_negative_create_with_blank_authorized_by_full(self): """Create User with blank Authorized by but having matching values in Password and verify fields and using valid Username, First Name, Surname, Email Address, Language @Feature: User - Negative Create Password and verify @Assert: User is not created. Appropriate error shown. """ with self.assertRaises(CLIReturnCodeError): User.create({ 'auth-source-id': '', 'login': gen_string('alpha'), 'mail': 'root@localhost', 'password': gen_string('alpha'), })
def test_negative_create_with_blank_authorized_by_full(self): """Create User with blank Authorized by but having matching values in Password and verify fields and using valid Username, First Name, Surname, Email Address, Language @id: 4b142a12-8354-437e-89cc-c0505bda2027 @Assert: User is not created. Appropriate error shown. """ with self.assertRaises(CLIReturnCodeError) as raise_ctx: User.create({ 'auth-source-id': '', 'login': gen_string('alpha'), 'mail': 'root@localhost', 'password': gen_string('alpha'), }) self.assert_error_msg(raise_ctx, u'Could not create the user:')
def test_negative_create_with_invalid_lastname(self): """Create User with invalid lastname @Feature: User - Negative Create @Assert: User is not created. Appropriate error shown. """ for invalid_lastname in (gen_string("alpha", 51), gen_string("html")): with self.subTest(invalid_lastname): with self.assertRaises(CLIReturnCodeError): User.create({ 'auth-source-id': 1, 'login': gen_string('alpha'), 'lastname': invalid_lastname, 'mail': 'root@localhost', 'password': gen_string('alpha'), })
def test_negative_create_user_5(self): """@Test: Create User with blank Authorized by @Feature: User - Negative Create @Steps: 1. Create User with blank Authorized by using valid Username, First Name, Surname, Email Address, Language @Assert: User is not created. Appropriate error shown. """ with self.assertRaises(CLIReturnCodeError): UserObj.create({ 'auth-source-id': '', 'login': gen_string('alpha'), 'mail': 'root@localhost', })
def test_negative_create_with_blank_authorized_by(self): """Create User with blank Authorized by :id: 1f60fbf8-a5f0-432e-9b4e-60bc0224294a :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ with self.assertRaisesRegex( CLIReturnCodeError, u'Could not create the user:'******'auth-source-id': '', 'login': gen_string('alpha'), 'mail': 'root@localhost', })
def test_negative_create_with_invalid_email(self): """Create User with invalid Email Address @Feature: User - Negative Create @Assert: User is not created. Appropriate error shown. """ for email in invalid_emails_list(): with self.subTest(email): with self.assertRaises(CLIReturnCodeError): User.create({ 'auth-source-id': 1, 'firstname': gen_string('alpha'), 'lastname': gen_string('alpha'), 'login': gen_string('alpha'), 'mail': email, 'password': gen_string('alpha'), })
def test_negative_create_with_empty_email(self): """Create User with empty Email Address @id: e55b2937-9b43-45ee-aa22-2d4ae6da01f3 @Assert: User is not created. Appropriate error shown. @BZ: 1204686 """ with self.assertRaises(CLIReturnCodeError): User.create({ 'auth-source-id': 1, 'firstname': gen_string('alpha'), 'lastname': gen_string('alpha'), 'login': gen_string('alpha'), 'mail': '', 'password': gen_string('alpha'), })
def test_negative_create_with_invalid_lastname(self): """Create User with invalid lastname @id: f73d2374-6bdf-4d25-945e-46a34fe692e7 @Assert: User is not created. Appropriate error shown. """ for invalid_lastname in (gen_string("alpha", 51), gen_string("html")): with self.subTest(invalid_lastname): with self.assertRaises(CLIReturnCodeError): User.create({ 'auth-source-id': 1, 'login': gen_string('alpha'), 'lastname': invalid_lastname, 'mail': 'root@localhost', 'password': gen_string('alpha'), })
def test_negative_create_with_invalid_firstname(self): """Create User with invalid First Name @id: 08b7be40-40f5-4423-91a6-03bb2bfb714c @Assert: User is not created. Appropriate error shown. """ for invalid_firstname in (gen_string("alpha", 51), gen_string("html")): with self.subTest(invalid_firstname): with self.assertRaises(CLIReturnCodeError): User.create({ 'auth-source-id': 1, 'login': gen_string('alpha'), 'firstname': invalid_firstname, 'mail': 'root@localhost', 'password': gen_string('alpha'), })
def test_negative_create_with_empty_email(self): """Create User with empty Email Address @Feature: User - Negative Create @Assert: User is not created. Appropriate error shown. @BZ: 1204686 """ with self.assertRaises(CLIReturnCodeError): User.create({ 'auth-source-id': 1, 'firstname': gen_string('alpha'), 'lastname': gen_string('alpha'), 'login': gen_string('alpha'), 'mail': '', 'password': gen_string('alpha'), })
def test_negative_create_with_invalid_email(self): """Create User with invalid Email Address @id: e21be14c-e985-4f27-b189-1cfe454e03d2 @Assert: User is not created. Appropriate error shown. """ for email in invalid_emails_list(): with self.subTest(email): with self.assertRaises(CLIReturnCodeError): User.create({ 'auth-source-id': 1, 'firstname': gen_string('alpha'), 'lastname': gen_string('alpha'), 'login': gen_string('alpha'), 'mail': email, 'password': gen_string('alpha'), })
def test_negative_create_with_blank_authorized_by_full(self): """Create User with blank Authorized by but having matching values in Password and verify fields and using valid Username, First Name, Surname, Email Address, Language :id: 4b142a12-8354-437e-89cc-c0505bda2027 :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ with self.assertRaisesRegex(CLIReturnCodeError, u'Could not create the user:'******'auth-source-id': '', 'login': gen_string('alpha'), 'mail': 'root@localhost', 'password': gen_string('alpha'), })
def test_negative_create_with_invalid_username(self): """Create User with invalid Username @Feature: User - Negative Create @Assert: User is not created. Appropriate error shown. """ for invalid_name in ('', 'space {0}'.format(gen_string('alpha')), gen_string('alpha', 101), gen_string('html')): with self.subTest(invalid_name): options = { 'auth-source-id': 1, 'login': invalid_name, 'mail': 'root@localhost', 'password': gen_string('alpha'), } self.logger.debug(str(options)) with self.assertRaises(CLIReturnCodeError): User.create(options)
def test_negative_create_with_empty_email(self): """Create User with empty Email Address @id: e55b2937-9b43-45ee-aa22-2d4ae6da01f3 @Assert: User is not created. Appropriate error shown. @BZ: 1204686 """ with self.assertRaises(CLIReturnCodeError) as raise_ctx: User.create({ 'auth-source-id': 1, 'firstname': gen_string('alpha'), 'lastname': gen_string('alpha'), 'login': gen_string('alpha'), 'mail': '', 'password': gen_string('alpha'), }) self.assert_error_msg(raise_ctx, u'Could not create the user:')
def test_negative_create_with_invalid_firstname(self): """Create User with invalid First Name @id: 08b7be40-40f5-4423-91a6-03bb2bfb714c @Assert: User is not created. Appropriate error shown. """ invalid_first_names = (gen_string("alpha", 51), gen_string("html")) for invalid_first_name in invalid_first_names: with self.subTest(invalid_first_name): options = { 'auth-source-id': 1, 'login': gen_string('alpha'), 'firstname': invalid_first_name, 'mail': 'root@localhost', 'password': gen_string('alpha'), } with self.assertRaises(CLIReturnCodeError) as raise_ctx: User.create(options) self.assert_error_msg(raise_ctx, u'Could not create the user')
def test_negative_create_with_invalid_lastname(self): """Create User with invalid lastname @id: f73d2374-6bdf-4d25-945e-46a34fe692e7 @Assert: User is not created. Appropriate error shown. """ invalid_lastnames = (gen_string("alpha", 51), gen_string("html")) for invalid_lastname in invalid_lastnames: with self.subTest(invalid_lastname): options = { 'auth-source-id': 1, 'login': gen_string('alpha'), 'lastname': invalid_lastname, 'mail': 'root@localhost', 'password': gen_string('alpha'), } with self.assertRaises(CLIReturnCodeError) as raise_ctx: User.create(options) self.assert_error_msg(raise_ctx, u'Could not create the user')
def test_negative_create_with_invalid_email(self): """Create User with invalid Email Address @id: e21be14c-e985-4f27-b189-1cfe454e03d2 @Assert: User is not created. Appropriate error shown. """ for email in invalid_emails_list(): with self.subTest(email): options = { 'auth-source-id': 1, 'firstname': gen_string('alpha'), 'lastname': gen_string('alpha'), 'login': gen_string('alpha'), 'mail': email, 'password': gen_string('alpha'), } with self.assertRaises(CLIReturnCodeError) as raise_ctx: User.create(options) self.assert_error_msg(raise_ctx, u'Could not create the user')
def test_negative_create_user_3(self, opts): """@Test: Create User with invalid Surname @Feature: User - Negative Create @Steps: 1. Create User for all invalid Surname in [2] using valid Username, First Name Email Address, Language, authorized by @Assert: User is not created. Appropriate error shown. """ with self.assertRaises(CLIReturnCodeError): UserObj.create({ 'auth-source-id': 1, 'login': gen_string('alpha'), 'lastname': opts['lastname'], 'mail': 'root@localhost', 'password': gen_string('alpha'), })
def test_negative_create_with_invalid_username(self): """Create User with invalid Username @Feature: User - Negative Create @Assert: User is not created. Appropriate error shown. """ for invalid_name in ('', 'space {0}'.format(gen_string('alpha')), gen_string('alpha', 101), gen_string('html')): with self.subTest(invalid_name): options = { 'auth-source-id': 1, 'login': invalid_name, 'mail': 'root@localhost', 'password': gen_string('alpha'), } self.logger.debug(str(options)) with self.assertRaises(CLIReturnCodeError): User.create(options)
def test_negative_create_with_empty_email(self): """Create User with empty Email Address :id: e55b2937-9b43-45ee-aa22-2d4ae6da01f3 :expectedresults: User is not created. Appropriate error shown. :BZ: 1204686 :CaseImportance: Critical """ with self.assertRaisesRegex(CLIReturnCodeError, u'Could not create the user:'******'auth-source-id': 1, 'firstname': gen_string('alpha'), 'lastname': gen_string('alpha'), 'login': gen_string('alpha'), 'mail': '', 'password': gen_string('alpha'), })
def test_negative_create_with_invalid_username(self): """Create User with invalid Username @id: 8bb53001-6377-49fe-a85c-f92204a5dea4 @Assert: User is not created. Appropriate error shown. """ invalid_names = ('', 'space {0}'.format(gen_string('alpha')), gen_string('alpha', 101), gen_string('html')) for invalid_name in invalid_names: with self.subTest(invalid_name): options = { 'auth-source-id': 1, 'login': invalid_name, 'mail': 'root@localhost', 'password': gen_string('alpha'), } self.logger.debug(str(options)) with self.assertRaises(CLIReturnCodeError) as raise_ctx: User.create(options) self.assert_error_msg(raise_ctx, u'Could not create the user:')
def test_negative_create_with_invalid_email(self): """Create User with invalid Email Address :id: e21be14c-e985-4f27-b189-1cfe454e03d2 :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ for email in invalid_emails_list(): with self.subTest(email): options = { 'auth-source-id': 1, 'firstname': gen_string('alpha'), 'lastname': gen_string('alpha'), 'login': gen_string('alpha'), 'mail': email, 'password': gen_string('alpha'), } with self.assertRaisesRegex(CLIReturnCodeError, u'Could not create the user'): User.create(options)
def test_negative_create_with_invalid_lastname(self): """Create User with invalid lastname :id: f73d2374-6bdf-4d25-945e-46a34fe692e7 :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ invalid_lastnames = (gen_string("alpha", 51), gen_string("html")) for invalid_lastname in invalid_lastnames: with self.subTest(invalid_lastname): options = { 'auth-source-id': 1, 'login': gen_string('alpha'), 'lastname': invalid_lastname, 'mail': 'root@localhost', 'password': gen_string('alpha'), } with self.assertRaisesRegex(CLIReturnCodeError, u'Could not create the user'): User.create(options)
def test_negative_create_with_invalid_firstname(self): """Create User with invalid First Name :id: 08b7be40-40f5-4423-91a6-03bb2bfb714c :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ invalid_first_names = (gen_string("alpha", 51), gen_string("html")) for invalid_first_name in invalid_first_names: with self.subTest(invalid_first_name): options = { 'auth-source-id': 1, 'login': gen_string('alpha'), 'firstname': invalid_first_name, 'mail': 'root@localhost', 'password': gen_string('alpha'), } with self.assertRaisesRegex(CLIReturnCodeError, u'Could not create the user'): User.create(options)
def test_negative_create_user_2(self): """@Test: Create User with invalid Firstname @Feature: User - Negative Create @Steps: 1. Create User for all invalid Firstname in [2] using valid Username, Surname, Email Address, Language, authorized by @Assert: User is not created. Appropriate error shown. """ for invalid_firstname in (gen_string("alpha", 51), gen_string("html")): with self.subTest(invalid_firstname): with self.assertRaises(CLIReturnCodeError): UserObj.create({ 'auth-source-id': 1, 'login': gen_string('alpha'), 'firstname': invalid_firstname, 'mail': 'root@localhost', 'password': gen_string('alpha'), })
def test_bugzilla_1204686(self): """@Test: Create User with Empty Email Address @Feature: User - Negative Create @Steps: 1. Create User with empty Email Address in [2] using valid Username, First Name, Surname, Language, authorized by @Assert: User is not created. Appropriate error shown. @BZ: 1204686 """ with self.assertRaises(CLIReturnCodeError): UserObj.create({ 'auth-source-id': 1, 'firstname': gen_string('alpha'), 'lastname': gen_string('alpha'), 'login': gen_string('alpha'), 'mail': '', 'password': gen_string('alpha'), })
def test_negative_create_user_4(self): """@Test: Create User with invalid Email Address @Feature: User - Negative Create @Steps: 1. Create User for all invalid Email Address in [2] using valid Username, First Name, Surname, Language, authorized by @Assert: User is not created. Appropriate error shown. """ for email in invalid_emails_list(): with self.subTest(email): with self.assertRaises(CLIReturnCodeError): UserObj.create({ 'auth-source-id': 1, 'firstname': gen_string('alpha'), 'lastname': gen_string('alpha'), 'login': gen_string('alpha'), 'mail': email, 'password': gen_string('alpha'), })
def test_negative_create_with_invalid_firstname(self): """Create User with invalid First Name @id: 08b7be40-40f5-4423-91a6-03bb2bfb714c @Assert: User is not created. Appropriate error shown. """ invalid_first_names = (gen_string("alpha", 51), gen_string("html")) for invalid_first_name in invalid_first_names: with self.subTest(invalid_first_name): options = { 'auth-source-id': 1, 'login': gen_string('alpha'), 'firstname': invalid_first_name, 'mail': 'root@localhost', 'password': gen_string('alpha'), } with self.assertRaises(CLIReturnCodeError) as raise_ctx: User.create(options) self.assert_error_msg( raise_ctx, u'Could not create the user' )
def test_negative_create_with_invalid_lastname(self): """Create User with invalid lastname @id: f73d2374-6bdf-4d25-945e-46a34fe692e7 @Assert: User is not created. Appropriate error shown. """ invalid_lastnames = (gen_string("alpha", 51), gen_string("html")) for invalid_lastname in invalid_lastnames: with self.subTest(invalid_lastname): options = { 'auth-source-id': 1, 'login': gen_string('alpha'), 'lastname': invalid_lastname, 'mail': 'root@localhost', 'password': gen_string('alpha'), } with self.assertRaises(CLIReturnCodeError) as raise_ctx: User.create(options) self.assert_error_msg( raise_ctx, u'Could not create the user' )
def test_negative_create_with_empty_email(self): """Create User with empty Email Address :id: e55b2937-9b43-45ee-aa22-2d4ae6da01f3 :expectedresults: User is not created. Appropriate error shown. :BZ: 1204686 :CaseImportance: Critical """ with self.assertRaisesRegex( CLIReturnCodeError, u'Could not create the user:'******'auth-source-id': 1, 'firstname': gen_string('alpha'), 'lastname': gen_string('alpha'), 'login': gen_string('alpha'), 'mail': '', 'password': gen_string('alpha'), })
def test_negative_create_with_invalid_email(self): """Create User with invalid Email Address :id: e21be14c-e985-4f27-b189-1cfe454e03d2 :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ for email in invalid_emails_list(): with self.subTest(email): options = { 'auth-source-id': 1, 'firstname': gen_string('alpha'), 'lastname': gen_string('alpha'), 'login': gen_string('alpha'), 'mail': email, 'password': gen_string('alpha'), } with self.assertRaisesRegex( CLIReturnCodeError, u'Could not create the user' ): User.create(options)
def test_negative_create_with_invalid_lastname(self): """Create User with invalid lastname :id: f73d2374-6bdf-4d25-945e-46a34fe692e7 :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ invalid_lastnames = (gen_string("alpha", 51), gen_string("html")) for invalid_lastname in invalid_lastnames: with self.subTest(invalid_lastname): options = { 'auth-source-id': 1, 'login': gen_string('alpha'), 'lastname': invalid_lastname, 'mail': 'root@localhost', 'password': gen_string('alpha'), } with self.assertRaisesRegex( CLIReturnCodeError, u'Could not create the user' ): User.create(options)
def test_negative_create_with_invalid_firstname(self): """Create User with invalid First Name :id: 08b7be40-40f5-4423-91a6-03bb2bfb714c :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ invalid_first_names = (gen_string("alpha", 51), gen_string("html")) for invalid_first_name in invalid_first_names: with self.subTest(invalid_first_name): options = { 'auth-source-id': 1, 'login': gen_string('alpha'), 'firstname': invalid_first_name, 'mail': 'root@localhost', 'password': gen_string('alpha'), } with self.assertRaisesRegex( CLIReturnCodeError, u'Could not create the user' ): User.create(options)