예제 #1
0
    def test_assert_user_not_exists(self):
        api = API("admin", "admin_auth_token")
        api.assert_user_not_exists("bad name")

        with self.assertRaises(APIException) as context:
            api.assert_user_not_exists("Albin Jaye")
        self.assertTrue(context.exception)
예제 #2
0
    def test_user_rename(self):
        api = API("rexy", "rexy")
        api.assert_user_not_exists("new fancy rexy")
        api.user_rename("new fancy rexy")

        api.assert_user_not_exists("rexy")
        api.assert_user_exists("new fancy rexy")

        api.user_delete()
예제 #3
0
    def test_user_delete(self):
        api = API("rexy", "rexy")
        api.user_delete()

        api2 = API("admin", "admin_auth_token")
        api2.assert_user_not_exists("rexy")