Skip to content

Commit

Permalink
Test with Gramps 5.2
Browse files Browse the repository at this point in the history
Hochzeit -> Heirat

Remove -00 from date

Try with python3-cairo

Try with python-gi-cairo

Try without python3-cairo
  • Loading branch information
DavidMStraub committed Nov 17, 2023
1 parent e6a264d commit 2079aba
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 tesseract-ocr tesseract-ocr-all
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 tesseract-ocr tesseract-ocr-all
- 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
Expand Down
4 changes: 2 additions & 2 deletions tests/test_endpoints/test_families.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 - , أحمد",
Expand Down Expand Up @@ -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 - , أحمد",
Expand Down
18 changes: 9 additions & 9 deletions tests/test_endpoints/test_people.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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."""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_endpoints/test_timelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 2079aba

Please sign in to comment.