Unit tests coverage for get_target_tenant_filter

This commit is contained in:
Joe H. Rahme 2013-06-03 15:43:31 +02:00
parent e7faae0df6
commit 445b134e9c
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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)