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))
Exemplo n.º 2
0
    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))