~citrix-openstack/glance/xenapi

« back to all changes in this revision

Viewing changes to tests/unit/test_misc.py

  • Committer: Armando Migliaccio
  • Date: 2011-03-04 13:04:20 UTC
  • mfrom: (75.2.4 glance)
  • Revision ID: armando.migliaccio@citrix.com-20110304130420-zkkm3kn6o4nri87y
merge lp:glance at revision 75

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
            self.assertEquals(0, exitcode)
146
146
            self.assertEquals('{"images": []}', out.strip())
147
147
 
148
 
            cmd = "curl -X POST -H 'Content-Type: application/octet-stream' "\
149
 
                  "-dinvalid http://0.0.0.0:%d/images" % api_port
150
 
            ignored, out, err = execute(cmd)
151
 
 
152
 
            self.assertTrue('Image type is required' in out,
153
 
                            "Could not find 'Image type is required' "
154
 
                            "in output: %s" % out)
155
 
 
156
148
            cmd = "./bin/glance-upload --port=%(api_port)d "\
157
 
                  "--type=invalid %(conf_file_name)s 'my image'" % locals()
 
149
                  "--type=invalid %(conf_file_name)s "\
 
150
                  "'my image'" % locals()
158
151
 
159
152
            # Normally, we would simply self.assertRaises() here, but
160
153
            # we also want to check that the Invalid image type is in