Exemplo n.º 1
0
    def test_all_lookups_basic(self):
        """

        This will return failures. Specifically:
          - python doesn't collate the same way as mysql so string comparisons will come out different  ('True' > '[]' for example)
          - fulltext search will throw errors on sqlite because it isn't supported (hardcoded to skip these tests)
          - fulltext search will throw errors on mysql if there isn't a fulltext index (hardcoded to skip these tests)
        """
        lookup_adapter = get_lookup_adapter()
        field_names = ['nullable_boolean', 'boolean', 'integer', 'float', 'decimal', 'text', 'date', 'datetime', 'foreign', 'many']
        test_values = list(self.generate_test_value_pairs())
        lookup_names = lookup_adapter.SUPPORTED_LOOKUP_NAMES

        self.assert_lookups_work(field_names, lookup_names, test_values, fail_fast=False, skip_first=0)
Exemplo n.º 2
0
 def test_func_exists_for_each_supported_lookup(self):
     lookup_adapter = get_lookup_adapter()
     for func_name in lookup_adapter.SUPPORTED_LOOKUP_NAMES:
         lookup_adapter.get_lookup_function(func_name)