dummy messagestore to test the api methods def initself self store def addself level message extratags self store appendmessagelevel message extratags def iterself return iterself store dummy message store to test the api methods
from django.contrib.messages import Message


class DummyStorage:
    

    def __init__(self):
        self.store = []

    def add(self, level, message, extra_tags=""):
        self.store.append(Message(level, message, extra_tags))

    def __iter__(self):
        return iter(self.store)