mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Also: - Rename `FooBarTestCase` test classes as `TestFooBar`. These were collected by pytest only because they were `unittest.TestCase` derived, but normally pytest collects only test classes whose name starts with `Test`, see https://docs.pytest.org/en/7.1.x/reference/reference.html#confval-python_classes
21 lines
1023 B
Python
21 lines
1023 B
Python
from galaxy_test.base.populators import LibraryPopulator
|
|
from galaxy_test.driver import integration_util
|
|
|
|
|
|
class TestConfigurationDecodeIntegration(integration_util.IntegrationTestCase):
|
|
def setUp(self):
|
|
super().setUp()
|
|
self.library_populator = LibraryPopulator(self.galaxy_interactor)
|
|
|
|
def test_admin_decode_id(self):
|
|
new_lib = self.library_populator.new_library("DecodeTestLibrary")
|
|
decode_response = self._get("configuration/decode/" + new_lib["id"], admin=True)
|
|
response_id = decode_response.json()["decoded_id"]
|
|
decoded_library_id = self._app.security.decode_id(new_lib["id"])
|
|
assert decoded_library_id == response_id
|
|
# fake valid folder id by prepending F
|
|
valid_encoded_folder_id = "F" + new_lib["id"]
|
|
folder_decode_response = self._get("configuration/decode/" + valid_encoded_folder_id, admin=True)
|
|
folder_response_id = folder_decode_response.json()["decoded_id"]
|
|
assert decoded_library_id == folder_response_id
|