diff options
author | Ben Sturmfels <ben@sturm.com.au> | 2021-03-05 23:12:19 +1100 |
---|---|---|
committer | Ben Sturmfels <ben@sturm.com.au> | 2021-03-05 23:12:19 +1100 |
commit | dec47c7102cf0aa3a4debf002928db8e460c0d71 (patch) | |
tree | 47631fc15c7af172aa699506adf3d76d3a71976c /mediagoblin/tests/test_tools.py | |
parent | 5f3a782fef4855e10b7259624a14d8afb0f7be93 (diff) | |
download | mediagoblin-dec47c7102cf0aa3a4debf002928db8e460c0d71.tar.lz mediagoblin-dec47c7102cf0aa3a4debf002928db8e460c0d71.tar.xz mediagoblin-dec47c7102cf0aa3a4debf002928db8e460c0d71.zip |
Apply `pyupgrade --py3-plus` to remove Python 2 compatibility code.
Diffstat (limited to 'mediagoblin/tests/test_tools.py')
-rw-r--r-- | mediagoblin/tests/test_tools.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mediagoblin/tests/test_tools.py b/mediagoblin/tests/test_tools.py index 5f916400..ffbd184c 100644 --- a/mediagoblin/tests/test_tools.py +++ b/mediagoblin/tests/test_tools.py @@ -14,10 +14,9 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from __future__ import absolute_import, unicode_literals try: - import mock + from unittest import mock except ImportError: import unittest.mock as mock @@ -27,7 +26,7 @@ from werkzeug.test import EnvironBuilder from mediagoblin.tools.request import decode_request from mediagoblin.tools.pagination import Pagination -class TestDecodeRequest(object): +class TestDecodeRequest: """Test the decode_request function.""" def test_form_type(self): @@ -67,7 +66,7 @@ class TestDecodeRequest(object): assert data['foo'] == 'bar' -class TestPagination(object): +class TestPagination: def _create_paginator(self, num_items, page, per_page): """Create a Paginator with a mock database cursor.""" mock_cursor = mock.MagicMock() |