Cleanup tests

Move test code into tests.
Remove last_failures test, as its replaced by other tests now.
Remove dead code.

Change-Id: I3514f62e003b1140fbe597cc91aea3089c268ac7
This commit is contained in:
Joe Gordon
2013-09-27 15:49:59 -07:00
parent 39b7ea7908
commit d209b83ee3
2 changed files with 4 additions and 24 deletions

View File

@@ -27,8 +27,10 @@ class TestClassifier(testtools.TestCase):
self.assertNotEqual(self.classifier.queries, None)
def test_elasticSearch(self):
self.classifier.test()
self.classifier.last_failures()
query = self.classifier._apply_template(self.classifier.targeted_template,
('@tags:"console.html" AND @message:"Finished: FAILURE"', '34825', '3'))
results = self.classifier.es.search(query, size='10')
self.assertTrue(int(results['hits']['total']) > 0, ("unable to find hit"))
def test_ready(self):
self.assertTrue(self.classifier._is_ready('49282', '3',