-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add creation modified times #100 #193
Conversation
3422aaf
to
72fe4d2
Compare
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 noticed the following before while fixing the service unit tests.
b001b13
to
781a442
Compare
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.
Looked through the updated service unit tests, just had a single thing that looked inconsistent, the rest LGTM.
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 reviewed your changes and they look good to me, thanks!
I have also reviewed yours and they look good to me too (I can't approve as its my PR) |
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.
Works well for me and all the tests look fine to me as well
**FULL_CATALOGUE_ITEM_A_INFO, | ||
**{ | ||
**FULL_CATALOGUE_ITEM_A_INFO, | ||
"created_time": FULL_CATALOGUE_ITEM_A_INFO["created_time"] - timedelta(days=5), |
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.
why is there this - timedelta(days=5)
in a lot of the tests? I don't understand what its purpose is
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.
Both create and update times are generated when something is created and only the update time gets updated when something is updated. In the update tests, we return what the entity looks like before it is updated so we set the create and modified time 5 days earlier so that we can then ensure that the modified time gets updated to the mocked datetime. Let me know if this does not make sense and I will talk to you.
Description
Adds
created_time
andupdated_time
fields to catalogue categories, catalogue items, items, manufacturers and systems.Draft as tests need updating.
Testing instructions
Add a set up instructions describing how the reviewer should test the code
Agile board tracking
Closes #100