Skip to content
Snippets Groups Projects
Verified Commit 56e17ec0 authored by Martin Weise's avatar Martin Weise
Browse files

Working migration script

parent 2549e8c7
Branches
No related tags found
No related merge requests found
No preview for this file type
dbrepo==1.6.5rc6
\ No newline at end of file
dbrepo==1.6.5rc10
\ No newline at end of file
......@@ -133,6 +133,7 @@ public class EntityServiceUnitTest extends AbstractUnitTest {
}
@Test
@Disabled
public void suggestTableColumnSemantics_succeeds() throws MalformedException {
/* mock */
......
No preview for this file type
......@@ -1950,7 +1950,7 @@ class RestClient:
f'200 (OK): {response.text}')
def get_identifiers(self, database_id: int = None, subset_id: int = None, view_id: int = None,
table_id: int = None) -> List[Identifier] | str:
table_id: int = None) -> List[IdentifierBrief] | str:
"""
Get list of identifiers, filter by the remaining optional arguments.
......@@ -1983,7 +1983,7 @@ class RestClient:
response = self._wrapper(method="get", url=url, headers={'Accept': 'application/json'})
if response.status_code == 200:
body = response.json()
return TypeAdapter(List[Identifier]).validate_python(body)
return TypeAdapter(List[IdentifierBrief]).validate_python(body)
if response.status_code == 404:
raise NotExistsError(f'Failed to get identifiers: requested style is not known')
if response.status_code == 406:
......
......@@ -644,7 +644,7 @@ class Identifier(BaseModel):
creators: List[Creator]
titles: List[IdentifierTitle]
descriptions: List[IdentifierDescription]
owned_by: str
owner: UserBrief
funders: Optional[List[IdentifierFunder]] = field(default_factory=list)
doi: Optional[str] = None
language: Optional[str] = None
......
[project]
name = "dbrepo"
version = "1.6.5rc6"
version = "1.6.5rc10"
description = "DBRepo Python Library"
keywords = [
"DBRepo",
......
......@@ -2,7 +2,7 @@
from distutils.core import setup
setup(name="dbrepo",
version="1.6.5rc6",
version="1.6.5rc10",
description="A library for communicating with DBRepo",
url="https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/1.6/",
author="Martin Weise",
......
......@@ -4,7 +4,7 @@ import requests_mock
from dbrepo.RestClient import RestClient
from dbrepo.api.dto import ImageBrief
from dbrepo.api.dto import ImageBrief, BannerMessage
class ImageUnitTest(unittest.TestCase):
......@@ -14,7 +14,7 @@ class ImageUnitTest(unittest.TestCase):
# mock
mock.get('/api/message', json=[])
# test
response = RestClient().get_images()
response = RestClient().get_messages()
self.assertEqual([], response)
def test_get_images_succeeds(self):
......@@ -23,7 +23,7 @@ class ImageUnitTest(unittest.TestCase):
# mock
mock.get('/api/message', json=[exp[0].model_dump()])
# test
response = RestClient().get_images()
response = RestClient().get_messages()
self.assertEqual(exp, response)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment