Example #1
0
    def test_resolves_dotted_path(self, pyramid_config):
        pyramid_config.maybe_dotted = mock.Mock()

        groups.set_groupfinder(pyramid_config, mock.sentinel.groupfinder)

        pyramid_config.maybe_dotted.assert_called_once_with(mock.sentinel.groupfinder)
Example #2
0
    def test_sets_dotted_path_resolved_object(self, pyramid_config):
        pyramid_config.maybe_dotted = mock.Mock()

        groups.set_groupfinder(pyramid_config, mock.sentinel.groupfinder)

        assert pyramid_config.registry[groups.GROUPFINDER_KEY] == pyramid_config.maybe_dotted.return_value
Example #3
0
    def test_stores_given_groupfinder_in_registry(self, pyramid_config):
        groups.set_groupfinder(pyramid_config, mock.sentinel.groupfinder)

        assert pyramid_config.registry[groups.GROUPFINDER_KEY] == mock.sentinel.groupfinder