Ejemplo n.º 1
0
 def test_volume_detail_view_with_existing_volume(self):
     volume = self.make_volume()
     request = self.create_request(matchdict=dict(id=volume.id))
     self.setup_session(request)
     view = VolumeView(request).volume_view()
     self.assertEqual(view.get('volume').id, volume.id)
     self.assertEqual(view.get('volume_name'), volume.id)
Ejemplo n.º 2
0
 def test_volume_detail_view_with_existing_volume(self):
     volume = self.make_volume()
     request = self.create_request(matchdict=dict(id=volume.id))
     self.setup_session(request)
     view = VolumeView(request).volume_view()
     self.assertEqual(view.get('volume').id, volume.id)
     self.assertEqual(view.get('volume_name'), volume.id)
Ejemplo n.º 3
0
 def test_volume_detail_view_with_new_volume(self):
     volume, conn = self.make_volume()
     request = self.create_request(matchdict=dict(id='new'))
     view = VolumeView(request, ec2_conn=conn).volume_view()
     self.assertEqual(view.get('volume'), None)
Ejemplo n.º 4
0
 def test_volume_detail_view_with_existing_volume(self):
     volume, conn = self.make_volume()
     request = self.create_request(matchdict=dict(id=volume.id))
     view = VolumeView(request, ec2_conn=conn).volume_view()
     self.assertEqual(view.get('volume').id, volume.id)
     self.assertEqual(view.get('volume_name'), volume.id)
Ejemplo n.º 5
0
 def test_volume_update_view(self):
     """Volume update should contain the volume form"""
     request = testing.DummyRequest(post=True)
     request.POST = {}
     view = VolumeView(request).volume_update()
     self.assertTrue(view.get('volume_form') is not None)
Ejemplo n.º 6
0
 def test_volume_detail_view_with_new_volume(self):
     volume, conn = self.make_volume()
     request = self.create_request(matchdict=dict(id='new'))
     view = VolumeView(request, ec2_conn=conn).volume_view()
     self.assertEqual(view.get('volume'), None)
Ejemplo n.º 7
0
 def test_volume_detail_view_with_existing_volume(self):
     volume, conn = self.make_volume()
     request = self.create_request(matchdict=dict(id=volume.id))
     view = VolumeView(request, ec2_conn=conn).volume_view()
     self.assertEqual(view.get('volume').id, volume.id)
     self.assertEqual(view.get('volume_name'), volume.id)
Ejemplo n.º 8
0
 def test_volume_update_view(self):
     """Volume update should contain the volume form"""
     request = testing.DummyRequest(post=True)
     view = VolumeView(request).volume_update()
     self.assertTrue(view.get('volume_form') is not None)