~wgrant/ubuntu/natty/landscape-client/natty-updates-broken

« back to all changes in this revision

Viewing changes to landscape/manager/tests/test_customgraph.py

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2010-04-21 19:58:10 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20100421195810-s30uv3s6i27lue38
Tags: 1.5.2-0ubuntu0.10.10.0
* New upstream version (LP: #594594):
  - A new includes information about active network devices and their
    IP address in sysinfo output (LP: #272344).
  - A new plugin collects information about network traffic (#LP :284662).
  - Report information about which packages requested a reboot (LP: #538253).
  - Fix breakage on Lucid AMIs having no ramdisk (LP: #574810).
  - Migrate the inter-process communication system from DBus to Twisted AMP.

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
        mock_chmod(ANY, 0700)
90
90
 
91
91
        mock_getpwnam = self.mocker.replace("pwd.getpwnam", passthrough=False)
 
92
 
92
93
        class pwnam(object):
93
94
            pw_uid = 1234
94
95
            pw_gid = 5678
131
132
        tempfile.close()
132
133
        os.chmod(filename, 0777)
133
134
        self.store.add_graph(123, filename, None)
 
135
 
134
136
        def check(ignore):
135
137
            self.graph_manager.exchange()
 
138
            script_hash = "483f2304b49063680c75e3c9e09cf6d0"
136
139
            self.assertMessages(
137
140
                self.broker_service.message_store.get_pending_messages(),
138
 
                [{"data":
139
 
                      {123: {"error": u"",
140
 
                             "values": [(300, 1.0)],
141
 
                             "script-hash": "483f2304b49063680c75e3c9e09cf6d0"
142
 
                            }
143
 
                      },
 
141
                [{"data": {123: {"error": u"",
 
142
                                 "values": [(300, 1.0)],
 
143
                                 "script-hash": script_hash}},
144
144
                  "type": "custom-graph"}])
145
145
        return self.graph_manager.run().addCallback(check)
146
146
 
158
158
        tempfile.close()
159
159
        os.chmod(filename, 0777)
160
160
        self.store.add_graph(124, filename, None)
 
161
 
161
162
        def check(ignore):
162
163
            self.graph_manager.exchange()
163
164
            self.assertMessages(