def test_url_callable(self, tmpdir, key):
        prefix = 'http://some.prefix.invalid/'
        mock_callable = Mock(return_value=prefix)

        store = WebFilesystemStore(tmpdir, mock_callable)

        expected = prefix + url_quote(key)
        assert store.url_for(key) == expected

        mock_callable.assert_called_with(store, key)
    def test_url_callable(self, tmpdir, key):
        prefix = 'http://some.prefix.invalid/'
        mock_callable = Mock(return_value=prefix)

        store = WebFilesystemStore(tmpdir, mock_callable)

        expected = prefix + url_quote(key)
        assert store.url_for(key) == expected

        mock_callable.assert_called_with(store, key)
 def test_correct_file_uri(self, store, tmpdir, key):
     expected = 'file://' + tmpdir + '/' + url_quote(key)
     assert store.url_for(key) == expected
 def test_url(self, store, url_prefix, key):
     expected = url_prefix + url_quote(key)
     assert store.url_for(key) == expected
 def test_correct_file_uri(self, store, tmpdir, key):
     expected = 'file://' + tmpdir + '/' + url_quote(key)
     assert store.url_for(key) == expected
 def test_url(self, store, url_prefix, key):
     expected = url_prefix + url_quote(key)
     assert store.url_for(key) == expected