def METHOD_NAME(self):
    # Unknown client
    try:
        self.th.get_access_token(
            "https://example.com/rp", "foo bar", "client_credentials"
        )
    except NotAllowed:
        pass
    # wrong grant_type
    try:
        self.th.get_access_token("https://example.org/rp", "foo bar", "implicit")
    except NotAllowed:
        pass