Skip to content

Commit

Permalink
Closes #415 : dependencies
Browse files Browse the repository at this point in the history
Closes #459 : dependencies
Closes #452 : dependencies
  • Loading branch information
mohierf committed Feb 11, 2018
1 parent cd5138e commit 4b4379e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ python-dateutil>=2.4.2
docopt
jsonschema
eve-swagger
configparser
flask-bootstrap
future
flask-apscheduler
# Force six version because influxdb requires this!
six==1.11.0
influxdb
statsd
# Force Flask version because Eve requires this!
flask>=0.10.1,<=0.12
Eve>=0.5
uwsgi
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@
data_files = data_files,

# Dependencies (if some) ...
# Set Flask dependency because of a forced dependency in Eve...
install_requires=[
'python-dateutil>=2.4.2', 'flask-bootstrap', 'docopt', 'jsonschema',
'eve-swagger', 'configparser', 'future', 'influxdb', 'flask-apscheduler',
'Eve>=0.5', 'uwsgi', 'statsd'
'flask>=0.10.1,<=0.12', 'Eve>=0.7.8', 'uwsgi', 'statsd'
],

# Entry points (if some) ...
Expand Down
3 changes: 1 addition & 2 deletions test/test_alignakretention.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ def test_retention(self):
self.endpoint + '/alignakretention/' + re[0]['_id'], json=data, headers=headers_put,
auth=self.auth2
)
resp = response.json()
self.assertEqual(resp['_status'], 'ERR', resp)
assert response.status_code == 412

# test user 'user2' can put data on data of user 'admin', but of course the user need have
# the _id and the _etag
Expand Down
9 changes: 6 additions & 3 deletions test/test_realms.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ def test_add_realm(self):
response = requests.patch(self.endpoint + '/realm/' + realmAll_A1_id, json=data,
headers=headers, auth=self.auth)
self.assertEqual(response.status_code, 412)
self.assertEqual(response.text, 'Updating _tree_parents is forbidden')
# response text is not forwarded before Flask 0.12.2!
# self.assertEqual(response.text, 'Updating _tree_parents is forbidden')

# Check that we can't update _children of a realm manually
response = requests.get(self.endpoint + '/realm', params={'where': '{"name":"All A1"}'},
Expand All @@ -393,7 +394,8 @@ def test_add_realm(self):
response = requests.patch(self.endpoint + '/realm/' + realmAll_A1_id, json=data,
headers=headers, auth=self.auth)
self.assertEqual(response.status_code, 412)
self.assertEqual(response.text, 'Updating _children is forbidden')
# response text is not forwarded before Flask 0.12.2!
# self.assertEqual(response.text, 'Updating _children is forbidden')

# Check that we can't update _all_children of a realm manually
response = requests.get(self.endpoint + '/realm', params={'where': '{"name":"All A1"}'},
Expand All @@ -408,7 +410,8 @@ def test_add_realm(self):
response = requests.patch(self.endpoint + '/realm/' + realmAll_A1_id, json=data,
headers=headers, auth=self.auth)
self.assertEqual(response.status_code, 412)
self.assertEqual(response.text, 'Updating _all_children is forbidden')
# response text is not forwarded before Flask 0.12.2!
# self.assertEqual(response.text, 'Updating _all_children is forbidden')

# Update realm name
response = requests.get(self.endpoint + '/realm', params={'where': '{"name":"All A1"}'},
Expand Down
2 changes: 1 addition & 1 deletion test/test_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def tearDown(cls):
:return: None
"""
for resource in ['grafana', 'graphite', 'influxdb']:
for resource in ['host', 'service', 'grafana', 'graphite', 'influxdb']:
requests.delete(cls.endpoint + '/' + resource, auth=cls.auth)

def test_prepare_data(self):
Expand Down

0 comments on commit 4b4379e

Please sign in to comment.