diff --git a/tests/units/fakes.py b/tests/units/fakes.py index 6473685..8e17ee6 100644 --- a/tests/units/fakes.py +++ b/tests/units/fakes.py @@ -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 diff --git a/tests/units/test_accounts.py b/tests/units/test_accounts.py index c893a65..6f014ff 100644 --- a/tests/units/test_accounts.py +++ b/tests/units/test_accounts.py @@ -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)