예제 #1
0
 def test_Finder(self):
     Configuration.load("./LogSpider/debug.yml")
     Finder.finder({
         'logType': 'mis_clt',
         'FileDate': '20190116',
         'TraceNo': '540002'
     })
예제 #2
0
 def setUp(self):
     Configuration.load("./LogSpider/debug.yml")
예제 #3
0
 def test_e_self_check(self):
     Configuration.load("")
     self.assertTrue(Configuration.self_check())
예제 #4
0
 def test_n_self_check(self):
     self.assertTrue(Configuration.self_check())
예제 #5
0
 def test_e_get_re(self):
     self.assertIsInstance(Configuration.get_re("xxxxx"), dict)
예제 #6
0
 def test_n_get_re(self):
     self.assertIsInstance(Configuration.get_re("postran"), dict)
예제 #7
0
 def test_e_load(self):
     self.assertFalse(Configuration.load())
     self.assertFalse(Configuration.load(""))
     self.assertFalse(Configuration.load(None))
예제 #8
0
 def test_n_load(self):
     Configuration.load("./LogSpider/debug.yml")
예제 #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,"返回值是否为列表")
예제 #10
0
    def test_e_sensor(self):
        Configuration.load("")
	print(Configuration.db_path)
        self.assertFalse(Sensor.sensor())
예제 #11
0
 def test_n_sensor(self):
     Configuration.load("./LogSpider/debug.yml")
     Sensor.sensor()
예제 #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"])
예제 #13
0
 def test_e_key_words_marching(self):
     Configuration.load("./LogSpider/debug.yml")
     self.assertFalse(Library.key_words_marching("xxx"))
예제 #14
0
 def test_n_key_words_marching(self):
     Configuration.load("./LogSpider/debug.yml")
     self.assertTrue(Library.key_words_marching("Rrn"))
예제 #15
0
 def test_n_spider(self):
     Configuration.load("./LogSpider/debug.yml")
     self.assertTrue(
         Spider.spider(file_date="20170221", log_type=["postran"]))