summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorChad Smith <chad.smith@canonical.com>2017-05-22 23:11:42 -0600
committerScott Moser <smoser@brickies.net>2017-05-24 12:38:58 -0400
commitfd0c88cf8e8aa015eadb5ab842e872cb627197ec (patch)
treef07e53cf52964432a171dbd0a208c6193b2d229e /tox.ini
parent2825a917e5fa130818c0d77219f32961b99a057f (diff)
downloadvyos-cloud-init-fd0c88cf8e8aa015eadb5ab842e872cb627197ec.tar.gz
vyos-cloud-init-fd0c88cf8e8aa015eadb5ab842e872cb627197ec.zip
cc_ntp: Restructure cc_ntp unit tests.
Any CiTestCase subclass can now set a class attribute with_logs = True and tests can now make assertions on self.logs.getvalue(). This branch restructures a bit of cc_ntp module to get better test coverage of the module. It also restructures the handler_cc_ntp unit tests to avoid nested mocks where possible. Deeply nested mocks cause a couple of issues: - greater risk: mocks are permanent within the scope, so multiple call-sites could be affected by package mocks - less legible tests: each mock doesn't advertise the actual call-site - tight coupling: the unit test logic to tightly bound to the actual implementation in remote (unrelated) modules which makes it more costly to maintain code - false success: we should be testing the expected behavior not specific remote method names as we want to know if that underlying behavior changes and breaks us. LP: #1692794
Diffstat (limited to 'tox.ini')
0 files changed, 0 insertions, 0 deletions