Example #1
0
 def test_Finder(self):
     Configuration.load("./LogSpider/debug.yml")
     Finder.finder({
         'logType': 'mis_clt',
         'FileDate': '20190116',
         'TraceNo': '540002'
     })
Example #2
0
 def setUp(self):
     Configuration.load("./LogSpider/debug.yml")
Example #3
0
 def test_e_self_check(self):
     Configuration.load("")
     self.assertTrue(Configuration.self_check())
Example #4
0
 def test_n_self_check(self):
     self.assertTrue(Configuration.self_check())
Example #5
0
 def test_e_get_re(self):
     self.assertIsInstance(Configuration.get_re("xxxxx"), dict)
Example #6
0
 def test_n_get_re(self):
     self.assertIsInstance(Configuration.get_re("postran"), dict)
Example #7
0
 def test_e_load(self):
     self.assertFalse(Configuration.load())
     self.assertFalse(Configuration.load(""))
     self.assertFalse(Configuration.load(None))
Example #8
0
 def test_n_load(self):
     Configuration.load("./LogSpider/debug.yml")
Example #9
0
    def test_n_file_names(self):
        Configuration.load("./LogSpider/debug.yml")
	result = Sensor.file_names(user_dir='/home/vagrant/shop/log')
	self.assertIsInstance(result,list,"返回值是否为列表")
Example #10
0
    def test_e_sensor(self):
        Configuration.load("")
	print(Configuration.db_path)
        self.assertFalse(Sensor.sensor())
Example #11
0
 def test_n_sensor(self):
     Configuration.load("./LogSpider/debug.yml")
     Sensor.sensor()
Example #12
0
    def test_LogSpider(self):

        Configuration.load("./LogSpider/debug.yml")
        #Spider.spider(file_date="20170221",log_type=Configuration.logType)
        Spider.spider(file_date="20170221", log_type=["postran"])
Example #13
0
 def test_e_key_words_marching(self):
     Configuration.load("./LogSpider/debug.yml")
     self.assertFalse(Library.key_words_marching("xxx"))
Example #14
0
 def test_n_key_words_marching(self):
     Configuration.load("./LogSpider/debug.yml")
     self.assertTrue(Library.key_words_marching("Rrn"))
Example #15
0
 def test_n_spider(self):
     Configuration.load("./LogSpider/debug.yml")
     self.assertTrue(
         Spider.spider(file_date="20170221", log_type=["postran"]))