From c18823cf8890a78c1b7790f5d53b7dab31b415c6 Mon Sep 17 00:00:00 2001 From: Hemna Date: Sun, 18 Dec 2022 13:03:25 -0500 Subject: [PATCH] fix tox runs --- tests/test_plugin.py | 6 ++++-- tox.ini | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 1f1d403..d0add12 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -3,6 +3,7 @@ import unittest from aprsd_slack_plugin import location_plugin + if sys.version_info >= (3, 2): from unittest import mock else: @@ -10,7 +11,7 @@ else: class TestPlugin(unittest.TestCase): - @mock.patch.object(location_plugin.SlackLocationPlugin, "command") + @mock.patch.object(location_plugin.SlackLocationPlugin, "filter") def test_plugin(self, mock_command): mock_command.return_value = "" @@ -19,4 +20,5 @@ class TestPlugin(unittest.TestCase): } p = location_plugin.SlackLocationPlugin(config) - p.command("KM6LYW", "location", 1) + packet = {"from": "WB4BOR", "message_text": "location"} + p.filter(packet) diff --git a/tox.ini b/tox.ini index a514bf1..2cb75d8 100644 --- a/tox.ini +++ b/tox.ini @@ -32,7 +32,7 @@ isolated_build = true [testenv] deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt + -r{toxinidir}/requirements-dev.txt commands = # Use -bb to enable BytesWarnings as error to catch str/bytes misuse. # Use -Werror to treat warnings as errors. @@ -42,14 +42,14 @@ commands = skip_install = true deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt + -r{toxinidir}/requirements-dev.txt commands = mypy src tests [testenv:lint] skip_install = true deps = - -r{toxinidir}/dev-requirements.txt + -r{toxinidir}/requirements-dev.txt commands = flake8 aprsd_slack_plugin tests @@ -57,7 +57,7 @@ commands = skip_install = true deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/dev-requirements.txt + -r{toxinidir}/requirements-dev.txt changedir = {toxinidir}/docs commands = {envpython} clean_docs.py @@ -67,7 +67,7 @@ commands = [testenv:fmt] skip_install = true deps = - -r{toxinidir}/dev-requirements.txt + -r{toxinidir}/requirements-dev.txt commands = isort aprsd_slack_plugin tests black aprsd_slack_plugin tests @@ -75,7 +75,7 @@ commands = [testenv:fmt-check] skip_install = true deps = - -r{toxinidir}/dev-requirements.txt + -r{toxinidir}/requirements-dev.txt commands = isort --check-only aprsd_slack_plugin tests black --check aprsd_slack_plugin tests