This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/data/test/test_userfiles.py

15 lines
418 B
Python

import pytest
from data.userfiles import DelegateUserfiles
@pytest.mark.parametrize('path,expected', [
('foo', 'test/foo'),
('bar', 'test/bar'),
('/bar', 'test/bar'),
('../foo', 'test/foo'),
('foo/bar/baz', 'test/baz'),
('foo/../baz', 'test/baz'),
])
def test_filepath(path, expected):
userfiles = DelegateUserfiles(None, None, 'local_us', 'test')
assert userfiles.get_file_id_path(path) == expected