def test_is_oauth(self): api = GetAPI("post/", { "response": { "200+": "$postResponse" } }) self.assertFalse(BaseTemplateMethods.is_oauth(api)) api.set_authorization({"#meta": API.OAUTH2}) self.assertTrue(BaseTemplateMethods.is_oauth(api))
def test_is_oauth(self): api = GetAPI("post/", {"response": {"200+": "$postResponse"}}) self.assertFalse(BaseTemplateMethods.is_oauth(api)) api.set_authorization({"#meta": API.OAUTH2}) self.assertTrue(BaseTemplateMethods.is_oauth(api))