from functools import partial from monday_com_orca_backend.api.routers.data import sql_queries class TestToSqlTuple: # Use sorted results for deterministic output, thus making comparison easier. func = partial(sql_queries._to_sql_tuple, sort=True) def test_strings(self): assert self.func(["a", "b", "c"]) == "('a','b','c')" def test_integers(self): assert self.func([1, 2, 3]) == "('1','2','3')" def test_mixed_types(self): assert self.func(["x", 5, "y"]) == "('5','x','y')" def test_duplicates(self): assert self.func(["a", "a", "b"]) == "('a','b')" def test_empty_list(self): assert self.func([]) == "()" def test_special_characters(self): result = self.func(["O'Reilly", "AC/DC"]) # SQL-safe escaping is not done, so expect raw quotes around strings assert result == "('AC/DC','O'Reilly')" def test_none_values(self): assert self.func([None, "x"]) == "('None','x')"