Exemplo n.º 1
0
    def test_request_data(self):
        wa_buttons = [WaCallButton()]
        media_content = WaAudioContentBuilder().set_rich_media_url("url")
        params = {
            "name": "name",
            "language": "language",
            "body_params": ["body_params"],
            "header_params": ["header_params"],
            "wa_buttons": wa_buttons,
            "media_content": media_content.get_request_data(),
            "type": "text",
        }

        obj = (WaAudioTemplate().set_name("name").set_language(
            "set_language").set_body_params(["body_params"]).set_header_params(
                [
                    "header_params"
                ]).set_wa_buttons(wa_buttons).set_media_content(media_content))

        self.assertEqual(obj.get_request_data(), params)
Exemplo n.º 2
0
 def test_is_required_key_set(self):
     required_key = ["name", "language", "body_params", "media_content"]
     obj = WaAudioTemplate()
     self.assertEqual(obj.required_key(), required_key)
Exemplo n.º 3
0
 def test_type(self):
     self.assertEqual(WaAudioTemplate().type(), "audio")