Exemplo n.º 1
0
 def test_instance_count(self):
     locate_obj = locatedb()
     buffer = locate_obj.count('__init__.py')
     log.info(buffer)
     self.assertIsNotNone(buffer)
Exemplo n.º 2
0
 def create_obj(self):
     locate_obj = locatedb(db_path=self.test_file)
Exemplo n.º 3
0
 def test_instance_find(self):
     locate_obj = locatedb()
     buffer = locate_obj.find('__init__.py', ignore_case=False, limit=2)
     str_list = buffer.getvalue().split("\n")
     log.info(str_list)
     self.assertEqual(len(str_list), 2)
Exemplo n.º 4
0
 def test_instance_count(self):
     locate_obj = locatedb()
     buffer = locate_obj.count('fstab')
     log.info(buffer)
     self.assertIsNotNone(buffer)
Exemplo n.º 5
0
 def test_instance_find(self):
     locate_obj = locatedb()
     buffer = locate_obj.find('fstab', ignore_case=False, limit=2)
     str_list = buffer.getvalue().split("\n")
     log.info(str_list)
     self.assertEqual(len(str_list), 2)
Exemplo n.º 6
0
 def test_instance_count(self):
     self.assertEqual(locatedb(db_path='/tmp/fixed.db').count('foobar'), 1)
Exemplo n.º 7
0
 def test_instance_find(self):
     self._assert_is_in(
         'foobar',
         locatedb(db_path="/tmp/fixed.db").find('foobar'))
Exemplo n.º 8
0
 def test_find(self):
     self._assert_is_in('foobar', locatedb(db_path='/tmp/fixed.db').find(
         'foobar', ignore_case=False, limit=2))