From 5eff018a314529a428b81413614497d2e0ede168 Mon Sep 17 00:00:00 2001 From: Sergey Motornyuk Date: Fri, 28 Jun 2024 19:09:59 +0300 Subject: [PATCH] chore: fix py2 tests --- ckanext/googleanalytics/tests/test_view.py | 4 ++-- setup.cfg | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ckanext/googleanalytics/tests/test_view.py b/ckanext/googleanalytics/tests/test_view.py index 48787fb..03162df 100644 --- a/ckanext/googleanalytics/tests/test_view.py +++ b/ckanext/googleanalytics/tests/test_view.py @@ -1,5 +1,5 @@ import pytest - +import six import ckan.plugins.toolkit as tk from ckanext.googleanalytics import config @@ -23,4 +23,4 @@ def test_tracking_(self, mode, tracking_id, app, ckan_config, monkeypatch): monkeypatch.setitem(ckan_config, config.CONFIG_TRACKING_MODE, mode) snippet = _render_header(mode, tracking_id) resp = app.get("/about") - assert snippet in resp.body + assert six.ensure_str(snippet) in resp diff --git a/setup.cfg b/setup.cfg index a0f964d..537092b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,6 +16,8 @@ classifiers = 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 keywords = CKAN