diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c04c3a48d..8820e0b929 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,8 @@ - [Feature][pull3342]: Add `Command.cmdset_source`, referring to the cmdset each command was originally pulled from (Volund) - [Feature][pull3343]: Add `access_type` as optional kwarg to lockfuncs (Volund) +- [Feature][pull3344]: New middleware for checking IP/subnets from requests. New + tools `evennia.utils.match_ip` and `utils.ip_from_request` to help. (Volund) - [Fix] (Backwards incompatible): Change `settings._TEST_ENVIRONMENT` to `settings.TEST_ENVIRONMENT` to address issues during refactored startup sequence. - [Fix][pull3197]: Make sure Global scripts only start in one place, @@ -68,6 +70,7 @@ [pull3338]: https://github.com/evennia/evennia/pull/3338 [pull3342]: https://github.com/evennia/evennia/pull/3342 [pull3343]: https://github.com/evennia/evennia/pull/3343 +[pull3344]: https://github.com/evennia/evennia/pull/3344 [issue3272]: https://github.com/evennia/evennia/issues/3272 [issue3273]: https://github.com/evennia/evennia/issues/3273 [issue3308]: https://github.com/evennia/evennia/issues/3307 diff --git a/evennia/contrib/rpg/llm/tests.py b/evennia/contrib/rpg/llm/tests.py index b37dfe94df..25e69b6dbd 100644 --- a/evennia/contrib/rpg/llm/tests.py +++ b/evennia/contrib/rpg/llm/tests.py @@ -5,16 +5,15 @@ Unit tests for the LLM Client and npc. from anything import Something from django.test import override_settings -from mock import Mock, patch - from evennia.utils.create import create_object from evennia.utils.test_resources import EvenniaTestCase +from mock import Mock, patch from .llm_npc import LLMNPC class TestLLMClient(EvenniaTestCase): - @override_settings(LLM_PROMPT_PREFIX="You are a test bot.") + @override_settings(LLM_PROMPT_PREFIX="You are a test bot.", TEST_ENVIRONMENT=True) @patch("evennia.contrib.rpg.llm.llm_npc.task.deferLater") def test_npc_at_talked_to(self, mock_deferLater): """