Ejemplo n.º 1
0
    def test__load_nonexistent_entry_point(self, pkg_resources):
        from anykeystore.store import _load_entry_point

        foo_mock = Mock(spec=['name', 'load'])
        foo_mock.name = 'foo'
        pkg_resources.iter_entry_points.return_value = [foo_mock]
        result = _load_entry_point('bar')
        self.assertEqual(result, None)
Ejemplo n.º 2
0
    def test__load__entry_point_with_no_pkg_resources(self):
        from anykeystore.store import _load_entry_point

        result = _load_entry_point('bar')
        self.assertEqual(result, None)