~evilnick/maas/docs+

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Jeroen Vermeulen
  • Date: 2012-09-28 15:37:50 UTC
  • mfrom: (1103.1.1 lintee-lintee)
  • Revision ID: tarmac-20120928153750-zi6itwlp5jcs79oq
[r=jtv][bug=][author=jtv] Lots more lint.  Come on people, run "make lint"!

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
        self.assertEqual([node.id], [n.id for n in tag.node_set.all()])
45
45
 
46
46
    def test_valid_tag_names(self):
47
 
        for valid in ['valid-dash', 'under_score', 'long'*50]:
 
47
        for valid in ['valid-dash', 'under_score', 'long' * 50]:
48
48
            tag = factory.make_tag(name=valid)
49
49
            self.assertEqual(valid, tag.name)
50
50
 
51
51
    def test_validate_traps_invalid_tag_name(self):
52
52
        for invalid in ['invalid:name', 'no spaces', 'no\ttabs',
53
53
                        'no&ampersand', 'no!shouting', '',
54
 
                        'too-long'*33, '\xb5']:
 
54
                        'too-long' * 33, '\xb5']:
55
55
            self.assertRaises(ValidationError, factory.make_tag, name=invalid)
56
56
 
57
57
    def test_populate_nodes_applies_tags_to_nodes(self):