Skip to content

Commit

Permalink
Fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Fonseca committed Dec 1, 2016
1 parent 7b264ff commit 78d5bd3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions example/zeus-sample-syslog-file.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def splitfunction(syslogFile):
{"timestamp": gettime(line), "message": getmsg(line)}
for line in syslogFile]
return t


path = os.getcwd() + "/example_syslog"
token = raw_input("Enter Token: ")

Expand Down
5 changes: 3 additions & 2 deletions tests/test_zeus_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,15 +354,15 @@ def test_get_triggered_alerts(self, mock_requests):

self.z.getTriggeredAlerts()

path = FAKE_SERVER + '/trigalerts/' + FAKE_TOKEN
path = FAKE_SERVER + '/triggeredalerts/' + FAKE_TOKEN
mock_requests.get.assert_called_with(path, params=None)

@mock.patch('zeus.interfaces.rest.requests')
def test_get_triggered_alerts_last_24h(self, mock_requests):

self.z.getTriggeredAlertsLast24Hours()

path = FAKE_SERVER + '/trigalerts/' + FAKE_TOKEN + "/last24"
path = FAKE_SERVER + '/triggeredalerts/' + FAKE_TOKEN + "/last24"
mock_requests.get.assert_called_with(path, params=None)

@mock.patch('zeus.interfaces.rest.requests')
Expand All @@ -374,5 +374,6 @@ def test_get_delete_metric_wrong_name(self, mock_requests):
def tearDown(self, mock_requests):
pass


if __name__ == '__main__':
unittest.main()

0 comments on commit 78d5bd3

Please sign in to comment.