Skip to content
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

Update supported python versions to 3.10, 3.11, 3.12 #663

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ flask-whooshee==0.8.2
Flask-WTF==1.0.1
flaskbb-plugin-conversations==1.1.1
flaskbb-plugin-portal==1.2.0
greenlet==1.1.2
greenlet==3.0.3
idna==3.3
itsdangerous==2.1.2
Jinja2==3.1.2
Expand Down
7 changes: 3 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ classifiers =
Intended Audience :: End Users/Desktop
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Topic :: Internet :: WWW/HTTP :: Dynamic Content
Topic :: Software Development :: Libraries :: Python Modules

Expand Down
9 changes: 6 additions & 3 deletions tests/unit/user/test_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def test_renders_get_okay(self, mocker):

def test_update_user_details_successfully_updates(self, user, mocker):
form = self.produce_form(
birthday="25 04 2000",
birthday="2000-04-25",
gender="awesome",
location="here",
website="http://web.site",
Expand All @@ -290,6 +290,9 @@ def test_update_user_details_successfully_updates(self, user, mocker):

result = view.post()
flashed = get_flashed_messages(with_categories=True)
if form.errors:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove those print statements from the unittests

print("form had errors")
print(form.errors)

assert flashed == [("success", "User details updated.")]
assert result.status_code == 302
Expand Down Expand Up @@ -317,7 +320,7 @@ def test_update_user_fails_with_invalid_input(self, mocker):
assert form.errors == {"birthday": ["Not a valid date value."]}

def test_update_user_fails_with_stopvalidation(self, mocker):
form = self.produce_form(birthday="25 04 2000")
form = self.produce_form(birthday="2000-04-25")
handler = mocker.Mock(spec=ChangeSetHandler)
handler.apply_changeset.side_effect = StopValidation(
[("birthday", "I just want you to know that's a great birthday")]
Expand All @@ -331,7 +334,7 @@ def test_update_user_fails_with_stopvalidation(self, mocker):
}

def test_update_user_fails_with_persistence_error(self, mocker):
form = self.produce_form(birthday="25 04 2000")
form = self.produce_form(birthday="2000-4-25")
handler = mocker.Mock(spec=ChangeSetHandler)
handler.apply_changeset.side_effect = PersistenceError("no")
view = ChangeUserDetails(form=form, details_update_handler=handler)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/user/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_transforms_to_expected_change_object(self):
data = MultiDict(
dict(
submit=True,
birthday="25 06 2000",
birthday="2000-06-25",
gender="awesome",
location="here",
website="http://flaskbb.org",
Expand Down Expand Up @@ -172,7 +172,7 @@ def test_transforms_to_expected_change_object(self):
def test_valid_inputs(self, formdata):
data = dict(
submit=True,
birthday="25 06 2000",
birthday="2000-06-25",
gender="awesome",
location="here",
website="http://flaskbb.org",
Expand Down
Loading