Skip to content

Commit

Permalink
test: Fix age limit tests to work on the first day of the month in th…
Browse files Browse the repository at this point in the history
…e most advanced time zone
  • Loading branch information
charmander committed Oct 31, 2024
1 parent c3c4c28 commit cb41d47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions weasyl/test/web/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_age_set_and_display(app):

@pytest.mark.usefixtures("db", "cache")
def test_age_terms(app):
u13_birthdate = arrow.utcnow().shift(years=-13, months=1)
u13_birthdate = arrow.utcnow().shift(years=-13, months=1, days=1)

user = db_utils.create_user(username="profiletest")
app.set_cookie(*db_utils.create_session(user).split("=", 1))
Expand Down Expand Up @@ -174,7 +174,7 @@ def _edit_journal(app, user):
(_edit_journal, True),
])
def test_assert_adult(app, create_post, expect_assertion):
u18_birthdate = arrow.utcnow().shift(years=-18, months=1)
u18_birthdate = arrow.utcnow().shift(years=-18, months=1, days=1)

forward_user = db_utils.create_user(username="forwarduser")
app.set_cookie(*db_utils.create_session(forward_user).split("=", 1))
Expand Down

0 comments on commit cb41d47

Please sign in to comment.