def test_celebration_with_user_configured_timezone(self): """ Check that the _get_now method uses the user's configured timezone over the browser timezone that is passed in as a parameter """ set_user_preference(self.user, 'time_zone', 'Asia/Tokyo') now = UserCelebration._get_now('America/New_York') # pylint: disable=protected-access assert str(now.tzinfo) == 'Asia/Tokyo'
def test_celebration_with_user_passed_in_timezone(self): """ Check that the _get_now method uses the user's timezone from the browser if none is configured """ now = UserCelebration._get_now('Asia/Tokyo') # pylint: disable=protected-access assert str(now.tzinfo) == 'Asia/Tokyo'