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