def test_save(): m = Message(data={}) m.save() assert len(m.key) == 40
def test_string_representation(): m = Message( key='1' * 40, data={'subject': 'hello', 'to': ['*****@*****.**']}, ) assert m.__str__() == 'hello to [email protected]'
def test_unicode_representation(): m = Message( key='1' * 40, data={'subject': 'héllô', 'to': ['*****@*****.**']}, ) assert m.__str__() == 'héllô to [email protected]'
def test_absolute_url(): m = Message(key='1' * 40) assert m.get_absolute_url()