예제 #1
0
    def test_assert_user_exists(self):
        api = API("admin", "admin_auth_token")
        api.assert_user_exists("Albin Jaye")

        with self.assertRaises(APIException) as context:
            api.assert_user_exists("not 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()