示例#1
0
 def test_notification_flatten(self, render_template):
     '''Test notification kwarg flattener
     '''
     obj = MagicMock()
     obj.__unicode__ = lambda x: 'quux'
     notification = Notification(from_email='*****@*****.**', foo='bar', baz=['qux1', obj])
     self.assertEquals(
         {'foo': 'bar', 'baz': 'qux1; qux2'},
         notification.convert_models(dict(foo='bar', baz=['qux1', 'qux2']))
     )