~lutostag/ubuntu/trusty/maas/1.5.4+keystone

« back to all changes in this revision

Viewing changes to src/maasserver/tests/test_views_tags.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2013-03-04 11:49:44 UTC
  • mto: This revision was merged to the branch mainline in revision 25.
  • Revision ID: package-import@ubuntu.com-20130304114944-azcvu9anlf8mizpa
Tags: upstream-1.3+bzr1452+dfsg
ImportĀ upstreamĀ versionĀ 1.3+bzr1452+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
        self.assertIn(node.hostname, content_text)
90
90
        self.assertNotIn(node2.hostname, content_text)
91
91
 
 
92
    def test_view_tag_shows_kernel_params(self):
 
93
        tag = factory.make_tag(kernel_opts='--test tag params')
 
94
        node = factory.make_node()
 
95
        node.tags = [tag]
 
96
        tag_link = reverse('tag-view', args=[tag.name])
 
97
        response = self.client.get(tag_link)
 
98
        doc = fromstring(response.content)
 
99
        kernel_opts = doc.cssselect('.kernel-opts-tag')[0].text_content()
 
100
        self.assertIn('Kernel Parameters', kernel_opts)
 
101
        self.assertIn(tag.kernel_opts, kernel_opts)
 
102
 
92
103
    def test_view_tag_paginates_nodes(self):
93
104
        """Listing of nodes with tag is split across multiple pages
94
105