MCPcopy Index your code
hub / github.com/googleapis/google-api-python-client / test_build_query

Method test_build_query

tests/test_model.py:72–90  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

70
71class TestBaseModel(unittest.TestCase):
72 def test_build_query(self):
73 model = BaseModel()
74
75 test_cases = [
76 ("hello", "world", "?hello=world"),
77 ("hello", "world", "?hello=world"),
78 ("hello", "세계", "?hello=%EC%84%B8%EA%B3%84"),
79 ("hello", "세계", "?hello=%EC%84%B8%EA%B3%84"),
80 ("hello", "こんにちは", "?hello=%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF"),
81 ("hello", "こんにちは", "?hello=%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF"),
82 ("hello", "你好", "?hello=%E4%BD%A0%E5%A5%BD"),
83 ("hello", "你好", "?hello=%E4%BD%A0%E5%A5%BD"),
84 ("hello", "مرحبا", "?hello=%D9%85%D8%B1%D8%AD%D8%A8%D8%A7"),
85 ("hello", "مرحبا", "?hello=%D9%85%D8%B1%D8%AD%D8%A8%D8%A7"),
86 ]
87
88 for case in test_cases:
89 key, value, expect = case
90 self.assertEqual(expect, model._build_query({key: value}))
91
92
93if __name__ == "__main__":

Callers

nothing calls this directly

Calls 2

_build_queryMethod · 0.95
BaseModelClass · 0.90

Tested by

no test coverage detected