示例#1
0
 def test_snapshot_detail_view(self):
     snapshot, conn = self.make_snapshot()
     request = self.create_request(matchdict=dict(id=snapshot.id))
     view = SnapshotView(request, ec2_conn=conn).snapshot_view()
     view_snapshot = view.get('snapshot')
     self.assertEqual(view_snapshot.id, snapshot.id)
     self.assertEqual(view.get('snapshot_name'), snapshot.id)
     self.assertEqual(view.get('snapshot_description'), u'test snapshot description')
     self.assertEqual(view.get('exists_volume'), True)
示例#2
0
 def test_snapshot_detail_view(self):
     snapshot, conn = self.make_snapshot()
     request = self.create_request(matchdict=dict(id=snapshot.id))
     view = SnapshotView(request, ec2_conn=conn).snapshot_view()
     view_snapshot = view.get('snapshot')
     self.assertEqual(view_snapshot.id, snapshot.id)
     self.assertEqual(view.get('snapshot_name'), snapshot.id)
     self.assertEqual(view.get('snapshot_description'),
                      u'test snapshot description')
     self.assertEqual(view.get('exists_volume'), True)
示例#3
0
 def test_snapshot_update_view(self):
     """Snapshot update should contain the snapshot form"""
     request = testing.DummyRequest(post=True)
     view = SnapshotView(request).snapshot_update()
     self.assertTrue(view.get('snapshot_form') is not None)
示例#4
0
 def test_snapshot_update_view(self):
     """Snapshot update should contain the snapshot form"""
     request = testing.DummyRequest(post=True)
     view = SnapshotView(request).snapshot_update()
     self.assertTrue(view.get('snapshot_form') is not None)