Unit tests coverage for get_target_tenant_filter
This commit is contained in:
parent
e7faae0df6
commit
445b134e9c
|
@ -75,6 +75,10 @@ def fake_get_config(section, option):
|
|||
raise ConfigurationError
|
||||
|
||||
|
||||
def fake_get_filter(self):
|
||||
return {'foo1', 'foo2', 'foo3'}
|
||||
|
||||
|
||||
class FakeSWConnection(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.mainargs = args
|
||||
|
|
|
@ -35,6 +35,8 @@ class TestAccountBase(tests.units.base.TestCase):
|
|||
self.stubs.Set(swiftclient.client, 'Connection',
|
||||
fakes.FakeSWConnection)
|
||||
self.stubs.Set(swsync.accounts, 'get_config', fakes.fake_get_config)
|
||||
self.stubs.Set(swsync.accounts.Accounts, 'get_target_tenant_filter',
|
||||
fakes.fake_get_filter)
|
||||
self.stubs.Set(swiftclient, 'http_connection',
|
||||
fakes.FakeSWClient.http_connection)
|
||||
|
||||
|
|
Loading…
Reference in New Issue