-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The tests test_init and test_dracor_info are too specific and will fail as soon as a minor upgrade is made to the DraCor API.
pydracor/pydracor/test_dracor.py
Lines 20 to 24 in 537d7c5
| def test_init(self): | |
| self.assertEqual(self.dracor.name, "DraCor API v1") | |
| self.assertEqual(self.dracor.status, "beta") | |
| self.assertEqual(self.dracor.existdb, "6.2.0") | |
| self.assertEqual(self.dracor.version, "1.0.0") |
pydracor/pydracor/test_dracor.py
Lines 58 to 64 in 537d7c5
| def test_dracor_info(self): | |
| self.assertEqual(self.dracor.dracor_info(),{ | |
| 'name': 'DraCor API v1', | |
| 'version': '1.0.0', | |
| 'status': 'beta', | |
| 'existdb': '6.2.0', | |
| 'base': 'https://dracor.org/api/v1'}) |
I suggest the following adjustments:
- only assert that that the major number of
versionis 1, the tests should succeed for any 1.x.x version - allow the following values for
status: "stable", "beta", "alpha" or ignore this property altogether since it should not really matter to pydracor (it will change to "stable" with the next production update, we forgot to change it for the 1.0 release) - do not make any assertions about the
existdbversion, it can change in no predictable ways and should be irrelevant for pydracor - allow for other properties of the info object to occur (hint: the next API update will add the URL to the OpenAPI documentation)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels