-
Notifications
You must be signed in to change notification settings - Fork 32
CV3-77 Clean up base.py test file #514
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
base: develop
Are you sure you want to change the base?
Conversation
cedf3d2 to
b6d4637
Compare
96d7677 to
9a596f6
Compare
MCFrank16
left a comment
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.
good job @mifeille it looks fine for me, but there are some files where you forgot to put on a new line.
9a596f6 to
872705b
Compare
Thank you @MCFrank16 It is done! |
shaluchandwani
left a comment
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.
Good Work on the PR @mifeille, It is working as expected. I have just one doubt that - should Kigali be added as locations in fixtures? I have commented on the same please check.
c96dae9 to
f58f8f1
Compare
shaluchandwani
left a comment
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.
Good work on the changes suggested @mifeille.
joshuaocero
left a comment
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.
Well done @mifeille. Please see my comments though. I basically think it would be better to handle association data the same way we handle the other data. The two functions could, therefore, be merged. Also for your data json files, since the folder is called test_data, the file names do not need to have data prepended. We can remove the repetition.
tests/base.py
Outdated
| color='green', | ||
| description='The description') | ||
| tag.save() | ||
| files = [ |
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.
Aren't we able to get all files in the test_data folder so we do not have edit this file when we have new test data to insert into the database?
tests/base.py
Outdated
| resolved=False, | ||
| ) | ||
| response_1.save() | ||
| association_tables_files = [ |
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.
Can we name the association table data differently so it can be easily identifiable?
| f.write('Traceback (most recent call last):\r') | ||
| f.write('if pattern.search(line):\r') | ||
| insert_data_in_database(db_session, files) | ||
| insert_association_tables_data(db_session, association_tables_files) |
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.
These two functions appear to be pretty similar. You should consider merging them.
96c0f7b to
b4f0c46
Compare
- clean up this file by putting test data in a separate data file that is loaded by base.py [Delivers CV3-77]
b4f0c46 to
ce1bb4b
Compare
Description
The base.py file has a large amount of test data that is loaded before tests are run. Clean up this file by putting this data is a separate data file that is loaded by base.py.
Type of change
Please select the relevant option
Checklist
How to Test
JIRA
CV3-77