def test_negative_automate_bz1437578(ldap_auth_source, function_user_group): """Verify error message on usergroup create with 'Domain Users' on AD user. :id: d4caf33e-b9eb-4281-9e04-fbe1d5b035dc :parametrized: yes :expectedresults: Error message as Domain Users is a special group in AD. :CaseLevel: Integration :BZ: 1437578 """ with pytest.raises(CLIReturnCodeError): result = UserGroupExternal.create({ 'auth-source-id': ldap_auth_source[1].id, 'user-group-id': function_user_group['id'], 'name': 'Domain Users', }) assert ('Could not create external user group: ' 'Name is not found in the authentication source' 'Name Domain Users is a special group in AD.' ' Unfortunately, we cannot obtain membership information' ' from a LDAP search and therefore sync it.' == result)
def test_negative_automate_bz1437578(self): """Verify error message on usergroup create with 'Domain Users' on AD user. :id: d4caf33e-b9eb-4281-9e04-fbe1d5b035dc :expectedresults: Error message as Domain Users is a special group in AD. :CaseLevel: Integration :BZ: 1437578 """ with self.assertRaises(CLIReturnCodeError): result = UserGroupExternal.create({ 'auth-source-id': self.auth['server']['id'], 'user-group-id': self.user_group['id'], 'name': 'Domain Users', }) self.assertEqual( 'Could not create external user group: ' 'Name is not found in the authentication source' 'Name Domain Users is a special group in AD.' ' Unfortunately, we cannot obtain membership information' ' from a LDAP search and therefore sync it.', result, )
def test_negative_automate_bz1437578(self): """Verify error message on usergroup create with 'Domain Users' on AD user. :id: d4caf33e-b9eb-4281-9e04-fbe1d5b035dc :expectedresults: Error message as Domain Users is a special group in AD. :CaseLevel: Integration :BZ: 1437578 """ with self.assertRaises(CLIReturnCodeError): result = UserGroupExternal.create({ 'auth-source-id': self.auth['server']['id'], 'user-group-id': self.user_group['id'], 'name': 'Domain Users' }) self.assertEqual('Could not create external user group: ' 'Name is not found in the authentication source' 'Name Domain Users is a special group in AD.' ' Unfortunately, we cannot obtain membership information' ' from a LDAP search and therefore sync it.', result)