~james-page/charms/trusty/swift-storage/xenial

« back to all changes in this revision

Viewing changes to unit_tests/test_swift_storage_relations.py

  • Committer: Corey Bryant
  • Date: 2015-11-03 17:08:12 UTC
  • mfrom: (92.1.1 swift-storage)
  • Revision ID: corey.bryant@canonical.com-20151103170812-nz99uxo379cmjxvx
[james-pages,r=corey.bryant] Add tox support for lint and unit tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from mock import patch, MagicMock
 
1
from mock import patch
2
2
 
3
3
from test_utils import CharmTestCase, patch_open
4
4
 
5
 
import lib.swift_storage_utils as utils
6
 
 
7
 
_reg = utils.register_configs
8
 
utils.register_configs = MagicMock()
9
 
 
10
5
with patch('hooks.lib.misc_utils.is_paused') as is_paused:
11
 
    import hooks.swift_storage_hooks as hooks
12
 
 
13
 
utils.register_configs = _reg
 
6
    with patch('hooks.lib.swift_storage_utils.register_configs') as _:
 
7
        import hooks.swift_storage_hooks as hooks
14
8
 
15
9
from lib.swift_storage_utils import PACKAGES
16
10