Fix for mock API change, bump setup.cfg version to 2015.2
Also, fix a unit test that is failing with newer versions of mock, which apparently changed the API around assert_has_calls() Change-Id: Icf7f159fb37783a38a33759963f04f50ec05e262 Depends-on: Ide474eb90acf0d07a807c401173b1f14f351f1c9
This commit is contained in:
parent
b8aeb53745
commit
7a077881c9
|
@ -1,6 +1,6 @@
|
|||
[metadata]
|
||||
name = akanda-appliance
|
||||
version = 2015.1
|
||||
version = 2015.2
|
||||
summary = Akanda Linux-based L3 software router
|
||||
description-file =
|
||||
README.md
|
||||
|
|
|
@ -46,16 +46,13 @@ class HostnameTestCase(TestCase):
|
|||
])
|
||||
|
||||
def test_update_hosts(self):
|
||||
expected = [
|
||||
expected = mock.call('/tmp/hosts', '\n'.join([
|
||||
'127.0.0.1 localhost',
|
||||
'::1 localhost ip6-localhost ip6-loopback',
|
||||
'fdca:3ba5:a17a:acda:f816:3eff:fe66:33b6 akanda'
|
||||
]
|
||||
]))
|
||||
self.mgr.update_hosts(CONFIG)
|
||||
self.mock_execute.assert_has_calls([
|
||||
mock.call(['mv', '/tmp/hosts', '/etc/hosts'], 'sudo')
|
||||
])
|
||||
self.mock_replace_file.assert_has_calls(mock.call(
|
||||
'/tmp/hosts',
|
||||
'\n'.join(expected))
|
||||
)
|
||||
self.mock_replace_file.assert_has_calls([expected])
|
||||
|
|
Loading…
Reference in New Issue