Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for column datatypes in DB Models #596

Open
1 task
chrizandr opened this issue Jul 6, 2021 · 2 comments
Open
1 task

Tests for column datatypes in DB Models #596

chrizandr opened this issue Jul 6, 2021 · 2 comments

Comments

@chrizandr
Copy link
Member

I'm submitting a

  • bug report.
  • [ x] feature request.

Current Behaviour:

Tests need to be added for the database built by the DB Model and check if the column types match based on the API Documentation. We should note here that we only match xsd:integer/float, all others should be varchar.

Expected Behaviour:

Steps to reproduce:

Snapshot:

Environment:

  • python version
  • pip version
  • OS details

Do you want to work on this issue?

@farazkhanfk7
Copy link
Member

@chrizandr The docs that we're currently using for tests don't have any supported property with range xsd:integer or float . But still to test the behaviour I've made changes in gen_dummy_object function in conftest.py ( commit dc5f7c2 ) to make sure that a random integer/float is returned if Column type in database is integer/float. This behavior is being tested throughout test cases as we're using it in test_app.py and test_crud.py in hydrus.

Couldn't find any other way to test column types. What else should we add here ?

@chrizandr
Copy link
Member Author

Ideally it should be a test to see if xsd:float is given in the documentation, then is the column for that property created with the correct datatype or not.

I noticed that we don't have any properties in the current API documentation, let's leave this for now till we have a better API doc to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants