From 4b8113153fdf73f2a84c6865692bc79a1409e6b4 Mon Sep 17 00:00:00 2001 From: David Straub Date: Thu, 31 Aug 2023 14:43:53 +0200 Subject: [PATCH] Test with Gramps 5.2 Hochzeit -> Heirat Remove -00 from date Try with python3-cairo Try with python-gi-cairo Try without python3-cairo --- .github/workflows/test.yml | 3 ++- tests/test_endpoints/test_families.py | 4 ++-- tests/test_endpoints/test_people.py | 18 +++++++++--------- tests/test_endpoints/test_timelines.py | 4 ++-- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2317f158..948c1bce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,11 +12,12 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install Ubuntu dependencies - run: sudo apt update && sudo apt-get -y install gettext appstream pkg-config libcairo2-dev gir1.2-gtk-3.0 libgirepository1.0-dev libicu-dev libopencv-dev python3-opencv python3-numpy gramps + run: sudo apt update && sudo apt-get -y install gettext appstream pkg-config libcairo2-dev gir1.2-gtk-3.0 libgirepository1.0-dev libicu-dev libopencv-dev python3-opencv python3-numpy python3-gi-cairo - name: Install Python dependencies run: | python -m pip install --upgrade pip wheel pip install pycairo PyGObject pytest PyYAML jsonschema pyICU + pip install git+https://github.com/gramps-project/gramps.git@maintenance/gramps52 pip install -r requirements-dev.txt pip install . pip list diff --git a/tests/test_endpoints/test_families.py b/tests/test_endpoints/test_families.py index 179d67c7..1eb82be4 100644 --- a/tests/test_endpoints/test_families.py +++ b/tests/test_endpoints/test_families.py @@ -452,7 +452,7 @@ def test_get_families_parameter_profile_expected_result(self): "age": "0 days", "citations": 0, "confidence": 0, - "date": "164-03-00 (Islamic)", + "date": "164-03 (Islamic)", "place": "", "type": "Birth", "summary": "Birth - , أحمد", @@ -497,7 +497,7 @@ def test_get_families_parameter_profile_expected_result(self): "person": [ { "birth": { - "date": "164-03-00 (Islamic)", + "date": "164-03 (Islamic)", "place": "", "type": "Birth", "summary": "Birth - , أحمد", diff --git a/tests/test_endpoints/test_people.py b/tests/test_endpoints/test_people.py index 9dfb02ce..9a7b0f41 100644 --- a/tests/test_endpoints/test_people.py +++ b/tests/test_endpoints/test_people.py @@ -520,7 +520,7 @@ def test_get_people_parameter_profile_expected_result(self): "age": "unknown", "citations": 0, "confidence": 0, - "date": "after 1760-02-00", + "date": "after 1760-02", "place": "Plattsburgh, Clinton, NY, USA", "summary": "Death - Aguilar, Eleanor", "type": "Death", @@ -540,7 +540,7 @@ def test_get_people_parameter_profile_expected_result(self): "age": "unknown", "citations": 0, "confidence": 0, - "date": "after 1760-02-00", + "date": "after 1760-02", "place": "Plattsburgh, Clinton, NY, USA", "role": "Primary", "summary": "Death - Aguilar, Eleanor", @@ -636,7 +636,7 @@ def test_get_people_parameter_profile_expected_result(self): "age": "unknown", "citations": 0, "confidence": 0, - "date": "after 1760-02-00", + "date": "after 1760-02", "place": "Plattsburgh, Clinton, NY, USA", "summary": "Death - Aguilar, Eleanor", "type": "Death", @@ -670,7 +670,7 @@ def test_get_people_parameter_profile_expected_result(self): "age": "unknown", "citations": 0, "confidence": 0, - "date": "after 1760-02-00", + "date": "after 1760-02", "place": "Plattsburgh, Clinton, NY, USA", "summary": "Death - Aguilar, Eleanor", "type": "Death", @@ -697,7 +697,7 @@ def test_get_people_parameter_profile_expected_result(self): "age": "unknown", "citations": 0, "confidence": 0, - "date": "before 1745-02-00", + "date": "before 1745-02", "place": "Wooster, OH, USA", "summary": "Death - Aguilar, John", "type": "Death", @@ -724,7 +724,7 @@ def test_get_people_parameter_profile_expected_result(self): "type": "Birth", }, "death": { - "date": "after 1760-02-00", + "date": "after 1760-02", "place": "Plattsburgh, Clinton, NY, USA", "summary": "Death - Aguilar, Eleanor", "type": "Death", @@ -745,7 +745,7 @@ def test_get_people_parameter_profile_expected_result(self): "type": "Birth", }, "death": { - "date": "before 1745-02-00", + "date": "before 1745-02", "place": "Wooster, OH, USA", "summary": "Death - Aguilar, John", "type": "Death", @@ -817,7 +817,7 @@ def test_get_people_parameter_profile_expected_result(self): "type": "Birth", }, "death": { - "date": "after 1760-02-00", + "date": "after 1760-02", "place": "Plattsburgh, Clinton, NY, USA", "summary": "Death - Aguilar, Eleanor", "type": "Death", @@ -842,7 +842,7 @@ def test_get_people_parameter_profile_expected_result_with_locale(self): self.assertEqual(rv[0]["profile"]["birth"]["age"], "0 Tage") self.assertEqual(rv[0]["profile"]["birth"]["type"], "Geburt") self.assertEqual(rv[0]["profile"]["families"][0]["relationship"], "Verheiratet") - self.assertEqual(rv[0]["profile"]["events"][2]["type"], "Hochzeit") + self.assertEqual(rv[0]["profile"]["events"][2]["type"], "Heirat") def test_get_people_parameter_backlinks_validate_semantics(self): """Test invalid backlinks parameter and values.""" diff --git a/tests/test_endpoints/test_timelines.py b/tests/test_endpoints/test_timelines.py index f7248bc7..c4731955 100644 --- a/tests/test_endpoints/test_timelines.py +++ b/tests/test_endpoints/test_timelines.py @@ -166,7 +166,7 @@ def test_get_timelines_people_parameter_rules_expected_response_single_rule(self def test_get_timelines_people_parameter_locale_expected_result(self): """Test expected profile response for a locale.""" rv = check_success(self, TEST_URL + "people/?page=1&locale=de") - self.assertEqual(rv[0]["label"], "Hochzeit") + self.assertEqual(rv[0]["label"], "Heirat") self.assertEqual(rv[0]["role"], "Familie") self.assertEqual(rv[0]["person"]["birth"]["type"], "Geburt") self.assertEqual(rv[0]["person"]["death"]["type"], "Tod") @@ -431,7 +431,7 @@ def test_get_timelines_families_parameter_rules_expected_response_single_rule(se def test_get_timelines_families_parameter_locale_expected_result(self): """Test expected profile response for a locale.""" rv = check_success(self, TEST_URL + "families/?page=1&locale=de") - self.assertEqual(rv[0]["label"], "Hochzeit") + self.assertEqual(rv[0]["label"], "Heirat") self.assertEqual(rv[0]["person"]["birth"]["type"], "Geburt") self.assertEqual(rv[0]["person"]["death"]["type"], "Tod") self.assertEqual(rv[0]["place"]["type"], "Stadt")