-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix deps - Small date time fixes for end of the month UTC issues #1220
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1220 +/- ##
==========================================
- Coverage 91.54% 90.84% -0.71%
==========================================
Files 153 187 +34
Lines 9842 11502 +1660
==========================================
+ Hits 9010 10449 +1439
- Misses 832 1053 +221
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@@ -89,7 +89,7 @@ def get_week_start_and_end_date(target_date: datetime = datetime.now(), index: i | |||
|
|||
def get_first_and_last_dates_of_month(month: int, year: int): | |||
"""Return first and last dates for a given month and year.""" | |||
start_date = datetime.now().replace(day=1, year=year, month=month) |
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 fails when running in the github workflow on the last of the month around 5 pm+
FAILED tests/unit/api/test_statement_settings.py::test_post_default_statement_settings_daily - AssertionError: assert '2023-09-01' == '2023-08-01'
- 2023-08-01
? ^
+ 2023-09-01
?
@@ -85,7 +86,8 @@ def test_payment_with_no_active_invoice(session): | |||
False, 3, None, None), | |||
('week_no_match', {'weekFilter': {'index': 2}}, False, 0, None, None), | |||
('week_match_all', {'weekFilter': {'index': 0}}, False, 3, None, None), | |||
('month', {'monthFilter': {'month': datetime.now().month, 'year': datetime.now().year}}, |
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 fails at the end of the month at 5 pm:
FAILED tests/unit/services/test_payment.py::test_search_payment_history[month-search_filter11-False-3-None-None] - AssertionError: assert 0 == 3
+ where 0 = <built-in method get of dict object at 0x7f031a8fdc00>('total')
+ where <built-in method get of dict object at 0x7f031a8fdc00> = {'items': [], 'limit': 2, 'page': 1, 'total': 0}.get
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-pay license (Apache 2.0).