Beispiel #1
0
class TestIdentityCreate(OpenAMTestCase):
    "Tests that the admin user perform create and delete operations on identities"
    def setUp(self):
            self.context = Context(self.url)
            self.user=User(self.context, self.username, self.password)

    def tearDown(self):
        if self.user:
            if self.user.is_valid():
                self.user.logout()

    def test_create_identity(self):
        self.identity = self.context.create_identity( self.user.tokenId, 'testuser', 'password', '*****@*****.**' )
        self.assertIsInstance( self.identity, Identity )
        self.assertTrue( self.user.tokenId, self.context.delete_identity() )
Beispiel #2
0
 def setUp(self):
         self.context = Context(self.url)
         self.user=User(self.context, self.username, self.password)