From e334300e71e91030576f9a56608fddcef75a8bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20R=C3=B6ggla?= Date: Fri, 17 Jul 2020 13:40:31 +0200 Subject: [PATCH] =?UTF-8?q?test=20f=C3=BCr=20schlagworte=20=C3=BCbergeordn?= =?UTF-8?q?et=20fallback?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/dataextractors/test_simple.py | 2 ++ "test/dataextractors/test_\303\274bergeordnet.py" | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/test/dataextractors/test_simple.py b/test/dataextractors/test_simple.py index 0f7971b..c1fc5c7 100644 --- a/test/dataextractors/test_simple.py +++ b/test/dataextractors/test_simple.py @@ -239,3 +239,5 @@ async def test_standardnummer(): assert target_dataframe.shape == (2, 2) assert target_dataframe.at['AC09705420', standardnummer.column] == 'VD18 90551591' assert target_dataframe.at['AC10438476', standardnummer.column].__repr__() == 'nan' + + diff --git "a/test/dataextractors/test_\303\274bergeordnet.py" "b/test/dataextractors/test_\303\274bergeordnet.py" index 80419be..bcd4f2f 100644 --- "a/test/dataextractors/test_\303\274bergeordnet.py" +++ "b/test/dataextractors/test_\303\274bergeordnet.py" @@ -69,4 +69,16 @@ async def test_werktitel_and_achlagworte(): if index == max: break - assert target_dataframe['Werktitel'].isna().sum() == len(empty) \ No newline at end of file + assert target_dataframe['Werktitel'].isna().sum() == len(empty) + + +@pytest.mark.asyncio +async def test_schlagworte_fallback(): + session = httpx.AsyncClient() + rr = RecordRetriever([], session=session) + df = pd.DataFrame() + schlag = Schlagworte(df) + record = await rr.get_record_from_ac_number('AC11064890') + result = await schlag.write(record) + assert not (result is None) + assert df.shape == (1, 1) \ No newline at end of file -- GitLab