~ubuntu-branches/ubuntu/precise/horizon/precise-updates

« back to all changes in this revision

Viewing changes to horizon/dashboards/nova/instances_and_volumes/volumes/tests.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandelman, Adrien Cunin
  • Date: 2012-04-04 07:21:15 UTC
  • mfrom: (1.1.12)
  • Revision ID: package-import@ubuntu.com-20120404072115-lb9v3gq3yv93ern2
Tags: 2012.1~rc2-0ubuntu1
[ Chuck Short ]
* New usptream release.
* debian/control: Use python-cherrypy3
* debian/rules: Update pythonpath in order to run tests.
* debian/patches/fix-coverage-binary-name.patch: Make the testsuite
  run.
* debian/rules: Fail build if tests fail.

[ Adam Gandelman ]
* debian/control: Add python-memcache 
* debain/dashboard.conf: Update to match current upstream documentation
  (LP: #966069)

[ Adrien Cunin ]
* Renamed Apache config file from dashboard.conf to openstack-dashboard.conf
  (LP: #965410)
  - Updated post{inst,rm} and added preinst to handle correctly the rename

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    def test_detail_view(self):
50
50
        volume = self.volumes.first()
51
51
        server = self.servers.first()
52
 
        volume.attachments = [{"serverId": server.id}]
 
52
        volume.attachments = [{"server_id": server.id}]
53
53
        self.mox.StubOutWithMock(api.nova, 'volume_get')
54
54
        self.mox.StubOutWithMock(api.nova, 'server_get')
55
55
        api.nova.volume_get(IsA(http.HttpRequest), volume.id).AndReturn(volume)
59
59
        url = reverse('horizon:nova:instances_and_volumes:volumes:detail',
60
60
                      args=[volume.id])
61
61
        res = self.client.get(url)
62
 
        self.assertEqual(res.status_code, 200)
 
62
 
 
63
        self.assertContains(res, "<dd>Volume name</dd>", 1, 200)
 
64
        self.assertContains(res, "<dd>1</dd>", 1, 200)
 
65
        self.assertContains(res, "<dd>Available</dd>", 1, 200)
 
66
        self.assertContains(res, "<dd>40 GB</dd>", 1, 200)
 
67
        self.assertContains(res, "<dd>04/01/12 at 10:30:00</dd>", 1, 200)
 
68
        self.assertContains(res, "<a href=\"/nova/instances_and_volumes/"
 
69
                            "instances/1/detail\">Instance server_1 "
 
70
                            "(1)</a>", 1, 200)
 
71
 
63
72
        self.assertNoMessages()