コード例 #1
0
 def test_should_return_content_on_valid_connection_data(self):
     # update connection.conf
     self.load_config()
     dr = DailyReport(host=self.host, port=self.port, username=self.username,
         password=self.password)
     output = dr.get_report(index_name=self.index_name)
     self.assertTrue(len(output) > 0)
コード例 #2
0
 def test_should_return_no_content_on_invalid_credentials(self):
     self.load_config()
     expected_content = ''
     dr = DailyReport(host=self.host, port=self.port, username='******', password='******')
     output = dr.get_report(index_name='lalala')
     self.assertEquals(expected_content, output)