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