~gandelman-a/ubuntu/precise/nova/UCA_2012.2.1

« back to all changes in this revision

Viewing changes to nova/tests/notifier/test_list_notifier.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-05-24 13:12:53 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20120524131253-ommql08fg1en06ut
Tags: 2012.2~f1-0ubuntu1
* New upstream release.
* Prepare for quantal:
  - Dropped debian/patches/upstream/0006-Use-project_id-in-ec2.cloud._format_image.patch
  - Dropped debian/patches/upstream/0005-Populate-image-properties-with-project_id-again.patch
  - Dropped debian/patches/upstream/0004-Fixed-bug-962840-added-a-test-case.patch
  - Dropped debian/patches/upstream/0003-Allow-unprivileged-RADOS-users-to-access-rbd-volumes.patch
  - Dropped debian/patches/upstream/0002-Stop-libvirt-test-from-deleting-instances-dir.patch
  - Dropped debian/patches/upstream/0001-fix-bug-where-nova-ignores-glance-host-in-imageref.patch 
  - Dropped debian/patches/0001-fix-useexisting-deprecation-warnings.patch
* debian/control: Add python-keystone as a dependency. (LP: #907197)
* debian/patches/kombu_tests_timeout.patch: Refreshed.
* debian/nova.conf, debian/nova-common.postinst: Convert to new ini
  file configuration
* debian/patches/nova-manage_flagfile_location.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
import nova
17
17
from nova import log as logging
18
18
import nova.notifier.api
 
19
from nova.notifier import list_notifier
19
20
import nova.notifier.log_notifier
20
21
import nova.notifier.no_op_notifier
21
 
from nova.notifier import list_notifier
22
22
from nova import test
23
23
 
24
24
 
58
58
        self.flags(notification_driver='nova.notifier.list_notifier',
59
59
                   list_notifier_drivers=['nova.notifier.no_op_notifier',
60
60
                                          'nova.notifier.no_op_notifier'])
61
 
        nova.notifier.api.notify('publisher_id', 'event_type',
 
61
        nova.notifier.api.notify('contextarg', 'publisher_id', 'event_type',
62
62
                nova.notifier.api.WARN, dict(a=3))
63
63
        self.assertEqual(self.notify_count, 2)
64
64
        self.assertEqual(self.exception_count, 0)
68
68
        self.flags(notification_driver='nova.notifier.list_notifier',
69
69
                   list_notifier_drivers=['nova.notifier.no_op_notifier',
70
70
                                          'nova.notifier.log_notifier'])
71
 
        nova.notifier.api.notify('publisher_id',
 
71
        nova.notifier.api.notify('contextarg', 'publisher_id',
72
72
                'event_type', nova.notifier.api.WARN, dict(a=3))
73
73
        self.assertEqual(self.notify_count, 1)
74
74
        self.assertEqual(self.exception_count, 1)
78
78
                   list_notifier_drivers=['nova.notifier.no_op_notifier',
79
79
                                          'nova.notifier.logo_notifier',
80
80
                                          'fdsjgsdfhjkhgsfkj'])
81
 
        nova.notifier.api.notify('publisher_id',
 
81
        nova.notifier.api.notify('contextarg', 'publisher_id',
82
82
                'event_type', nova.notifier.api.WARN, dict(a=3))
83
83
        self.assertEqual(self.exception_count, 2)
84
84
        self.assertEqual(self.notify_count, 1)