diff options
Diffstat (limited to 'test/units/plugins/test_plugins.py')
-rw-r--r-- | test/units/plugins/test_plugins.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/units/plugins/test_plugins.py b/test/units/plugins/test_plugins.py index ba2ad2b6..be123b15 100644 --- a/test/units/plugins/test_plugins.py +++ b/test/units/plugins/test_plugins.py @@ -46,14 +46,14 @@ class TestErrors(unittest.TestCase): # python library, and then uses the __file__ attribute of # the result for that to get the library path, so we mock # that here and patch the builtin to use our mocked result - foo_pkg = MagicMock() - bar_pkg = MagicMock() + foo = MagicMock() + bar = MagicMock() bam = MagicMock() bam.__file__ = '/path/to/my/foo/bar/bam/__init__.py' - bar_pkg.bam = bam - foo_pkg.return_value.bar = bar_pkg + bar.bam = bam + foo.return_value.bar = bar pl = PluginLoader('test', 'foo.bar.bam', 'test', 'test_plugin') - with patch('builtins.__import__', foo_pkg): + with patch('builtins.__import__', foo): self.assertEqual(pl._get_package_paths(), ['/path/to/my/foo/bar/bam']) def test_plugins__get_paths(self): |