Skip to content

Commit

Permalink
v9.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
GitRon committed Feb 2, 2024
1 parent 81a1707 commit 9d02031
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

**9.5.0** (2024-02-02)
* Downgraded sphinx to 7.1.* for Python 3.8 compatability

**9.4.4** (2024-01-22)
* Downgraded sphinx to 7.1.* for Python 3.8 compatability

Expand Down
2 changes: 1 addition & 1 deletion ambient_toolbox/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Python toolbox of Ambient Digital containing an abundance of useful tools and gadgets."""

__version__ = "9.4.4"
__version__ = "9.5.0"
10 changes: 10 additions & 0 deletions ambient_toolbox/tests/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,13 @@ def assert_partial_message_in_request(self, request: WSGIRequest, message: str)
message_found = True

self.assertTrue(message_found, f"Message part {message!r} not found in request.")

def assert_message_not_in_request(self, request: WSGIRequest, message: str) -> None:
messages = list(get_messages(request))

message_found = False
for request_message in messages:
if str(request_message) == message:
message_found = True

self.assertFalse(message_found, f"Message {message!r} not found in request.")
4 changes: 4 additions & 0 deletions tests/tests/mixins/test_django_message_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ def test_full_message_found(self):
def test_partial_message_found(self):
messages.add_message(self.request, messages.INFO, "My message")
self.assert_partial_message_in_request(request=self.request, message="My")

def test_message_not_found(self):
messages.add_message(self.request, messages.INFO, "My message")
self.assert_message_not_in_request(request=self.request, message="Ninja")

0 comments on commit 9d02031

Please sign in to comment.