-
Notifications
You must be signed in to change notification settings - Fork 23
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
Dev/unit tests #246
Dev/unit tests #246
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a great start for the tests. One thing I would look into doing is seeing if instead of construction the database models yourself by setting attributes you load a sqlite database as a fixture to the test with real values in it.
This will allow you to write model validation tests that use real data.
Another interesting thing to do would be to try and have the nettest workflow write the database and then you would call the relevant functions to ensure that it wrote the expected values in the DB.
@hellais can this be merged like android? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I would say that as soon as the failure on travis is investigated and resolved this can be merged into master.
See: https://travis-ci.org/ooni/probe-ios/builds/511524503#L1717 & https://github.com/ooni/probe-ios/pull/246/files#r273503527
Now travis works, UI tests are kinda broken. I filled a ticket and will work on them in another branch. |
Travis still with some error as the last row added by me executes all tests, including UI Tests, not only unit tests |
travis fixed and building. unit test working. |
Fixes #233
Proposed Changes