コード例 #1
0
    def test_contains_filter_dates(self):
        eq_filter = ContainsFilter(
            'test', [date(2000, 1, 1),
                     date(2000, 1, 2),
                     date(2000, 1, 3)])

        schemas = eq_filter.schemas(self.test_table.foo)

        self.assertEqual(
            '"foo" IN (\'2000-01-01\',\'2000-01-02\',\'2000-01-03\')',
            str(schemas))
コード例 #2
0
    def test_contains_filter_strings(self):
        eq_filter = ContainsFilter('test', ['abc', 'efg', 'hij'])

        schemas = eq_filter.schemas(self.test_table.foo)

        self.assertEqual('"foo" IN (\'abc\',\'efg\',\'hij\')', str(schemas))
コード例 #3
0
    def test_contains_filter_characters(self):
        eq_filter = ContainsFilter('test', ['a', 'b', 'c'])

        schemas = eq_filter.schemas(self.test_table.foo)

        self.assertEqual('"foo" IN (\'a\',\'b\',\'c\')', str(schemas))
コード例 #4
0
    def test_contains_filter_numbers(self):
        eq_filter = ContainsFilter('test', [1, 2, 3])

        schemas = eq_filter.schemas(self.test_table.foo)

        self.assertEqual('"foo" IN (1,2,3)', str(schemas))