Refresh requirements, drop lint
This commit is contained in:
parent
e1c08420a5
commit
1576b2027c
|
@ -1,4 +1,5 @@
|
||||||
|
# Requirements to build the charm
|
||||||
charm-tools
|
charm-tools
|
||||||
flake8
|
|
||||||
ruamel.yaml==0.10.12
|
ruamel.yaml==0.10.12
|
||||||
simplejson
|
simplejson
|
||||||
|
flake8
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Unit test requirements
|
||||||
flake8>=2.2.4,<=2.4.1
|
flake8>=2.2.4,<=2.4.1
|
||||||
os-testr>=0.4.1
|
os-testr>=0.4.1
|
||||||
charms.reactive
|
charms.reactive
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -25,7 +25,7 @@ commands =
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8 {posargs} src/reactive src/lib
|
commands = flake8 {posargs} src/reactive src/lib unit_tests
|
||||||
|
|
||||||
[testenv:py27]
|
[testenv:py27]
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
|
|
|
@ -143,20 +143,12 @@ class TestAodhHandlers(unittest.TestCase):
|
||||||
def test_setup_amqp_req(self):
|
def test_setup_amqp_req(self):
|
||||||
self.patch(handlers.aodh, 'assess_status')
|
self.patch(handlers.aodh, 'assess_status')
|
||||||
amqp = mock.MagicMock()
|
amqp = mock.MagicMock()
|
||||||
reply = {
|
|
||||||
'rabbit-user': 'user1',
|
|
||||||
'rabbit-vhost': 'vhost1',
|
|
||||||
}
|
|
||||||
handlers.setup_amqp_req(amqp)
|
handlers.setup_amqp_req(amqp)
|
||||||
amqp.request_access.assert_called_once_with(
|
amqp.request_access.assert_called_once_with(
|
||||||
username='aodh', vhost='openstack')
|
username='aodh', vhost='openstack')
|
||||||
|
|
||||||
def test_database(self):
|
def test_database(self):
|
||||||
database = mock.MagicMock()
|
database = mock.MagicMock()
|
||||||
reply = {
|
|
||||||
'database': 'db1',
|
|
||||||
'database-user': 'dbuser1',
|
|
||||||
}
|
|
||||||
self.patch(handlers.hookenv, 'unit_private_ip', 'private_ip')
|
self.patch(handlers.hookenv, 'unit_private_ip', 'private_ip')
|
||||||
self.patch(handlers.aodh, 'assess_status')
|
self.patch(handlers.aodh, 'assess_status')
|
||||||
handlers.setup_database(database)
|
handlers.setup_database(database)
|
||||||
|
@ -169,7 +161,7 @@ class TestAodhHandlers(unittest.TestCase):
|
||||||
handlers.setup_endpoint('endpoint_object')
|
handlers.setup_endpoint('endpoint_object')
|
||||||
self.setup_endpoint.assert_called_once_with('endpoint_object')
|
self.setup_endpoint.assert_called_once_with('endpoint_object')
|
||||||
|
|
||||||
def test_render_unclustered(self):
|
def test_render(self):
|
||||||
self.patch(handlers.aodh, 'render_configs')
|
self.patch(handlers.aodh, 'render_configs')
|
||||||
self.patch(handlers.aodh, 'assess_status')
|
self.patch(handlers.aodh, 'assess_status')
|
||||||
handlers.render_unclustered('arg1', 'arg2')
|
handlers.render_unclustered('arg1', 'arg2')
|
||||||
|
|
Loading…
Reference in New Issue