Exemplo n.º 1
0
 def test_models(self):
   self.fixtures()
   results = full_search(self.pw, "felun"
     , include_entity=True
     , models=['User']
     )
   self.assertEqual(results['cant_results'], 1)
Exemplo n.º 2
0
 def test_fields(self):
   self.fixtures()
   results = full_search(self.pw, "felun"
     , include_entity=True
     , fields=["name"]
     )
   self.assertEqual(results['cant_results'], 2)
Exemplo n.º 3
0
    def test_full_search_with_wildcards(self):
      self.fixtures()

      found = full_search(self.pw, "fel"
        , add_wildcards=True
        , include_entity=True
        )
      self.assertEqual(found['cant_results'], 4)
Exemplo n.º 4
0
 def test_models(self):
     self.fixtures()
     results = full_search(self.pw, "felun", include_entity=True, models=["User"])
     self.assertEqual(results["cant_results"], 1)
Exemplo n.º 5
0
 def test_fields(self):
     self.fixtures()
     results = full_search(self.pw, "felun", include_entity=True, fields=["name"])
     self.assertEqual(results["cant_results"], 2)
Exemplo n.º 6
0
        def test_full_search_with_wildcards(self):
            self.fixtures()

            found = full_search(self.pw, "fel", add_wildcards=True, include_entity=True)
            self.assertEqual(found["cant_results"], 4)
Exemplo n.º 7
0
        def test_full_search_without_wildcards(self):
            self.fixtures()

            found = full_search(self.pw, "fel")
            self.assertEqual(found["cant_results"], 0)
Exemplo n.º 8
0
 def test_except_field(self):
     self.fixtures()
     results = full_search(self.pw, "felun", except_fields=["name"])
     self.assertEqual(results["cant_results"], 0)
Exemplo n.º 9
0
    def test_full_search_without_wildcards(self):
      self.fixtures()

      found = full_search(self.pw, "fel")
      self.assertEqual(found['cant_results'], 0)
Exemplo n.º 10
0
 def test_except_field(self):
   self.fixtures()
   results = full_search(self.pw, "felun", except_fields=["name"])
   self.assertEqual(results['cant_results'], 0)