~ubuntuone-pqm-team/python-oops-dictconfig/stable

« back to all changes in this revision

Viewing changes to oops_dictconfig/tests/test_dictconfig.py

  • Committer: Tarmac
  • Author(s): James Westby
  • Date: 2012-06-06 13:21:50 UTC
  • mfrom: (6.2.1 set-template)
  • Revision ID: tarmac@server-9963-20120606132150-r8tqdmyf9ytt9jzn
[r=jml] Allow setting the oops template from the dict config.

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
        #   oops.publish_new_only. Find a better way of testing that the
227
227
        #   publish method was wrapped by oops.publish_new_only
228
228
        self.assertEquals('result', config.publishers[0].func_name)
 
229
 
 
230
    def test_no_template_gives_blank_template(self):
 
231
        config = config_from_dict(dict())
 
232
        self.assertEqual({}, config.template)
 
233
 
 
234
    def test_empty_template_gives_blank_template(self):
 
235
        config = config_from_dict(dict(template={}))
 
236
        self.assertEqual({}, config.template)
 
237
 
 
238
    def test_non_empty_template_gives_non_empty_template(self):
 
239
        config = config_from_dict(dict(template=dict(foo='bar')))
 
240
        self.assertEqual(dict(foo='bar'), config.template)