Skip to content

Commit c5ae775

Browse files
authored
Fix test for new demo data (#62)
1 parent 8880d42 commit c5ae775

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ repos:
1212
- id: flake8
1313
args: ['--config=.flake8']
1414
- repo: https://github.com/psf/black
15-
rev: 21.10b0
15+
rev: 22.6.0
1616
hooks:
1717
- id: black

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ six >= 1.10
33
python_dateutil >= 2.5.3
44
setuptools >= 21.0.0
55
urllib3 >= 1.15.1
6-
pre-commit >= 2.10.0
6+
pre-commit >= 2.19.0

test/test_projects_api.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_retrieve_project_language(self):
7171
"""
7272
project_id = "pro_test_2b67b11a030b66e0a6dd61a56b49079a"
7373
project = self.api.retrieve_project(id=project_id, accept_language="fr").data
74-
self.assertIn("Projet", project.name) # French
74+
self.assertIn("Démo", project.name) # French
7575

7676
def test_retrieve_projects(self):
7777
"""Test case for retrieve_projects
@@ -87,13 +87,13 @@ def test_retrieve_projects(self):
8787
self.assertEqual(project.production, False)
8888
self.assertGreater(project.average_price_per_tonne_cents_usd, 0)
8989
self.assertGreater(project.remaining_mass_g, 0)
90-
self.assertEqual(project.standard, None)
90+
self.assertIsInstance(project.standard, object)
9191
self.assertIsInstance(project.name, str)
9292
self.assertTrue(project.description)
9393
self.assertIsInstance(project.country, str)
9494
self.assertIsInstance(project.type, str)
9595
self.assertIsInstance(project.developer, str)
96-
self.assertTrue(isinstance(project.photos, list))
96+
self.assertIsInstance(project.photos, list)
9797

9898
def test_retrieve_biomass_projects(self):
9999
"""Test case for retrieve_projects with a type filter
@@ -141,7 +141,7 @@ def test_retrieve_projects_language(self):
141141
projects = self.api.retrieve_projects(accept_language="fr").data
142142

143143
for project in projects:
144-
self.assertIn("Projet", project.name) # French
144+
self.assertIn("Démo", project.name) # French
145145

146146

147147
if __name__ == "__main__":

0 commit comments

Comments
 (0)