Exemplo n.º 1
0
 def test_self_is_forbidden(self):
     self.assertFalse(misc.is_valid_attribute_name('self'))
Exemplo n.º 2
0
 def test_hidden_names_are_forbidden(self):
     self.assertFalse(misc.is_valid_attribute_name('_z'))
Exemplo n.º 3
0
 def test_hidden_names_can_be_allowed(self):
     self.assertTrue(
         misc.is_valid_attribute_name('_z', allow_hidden=True))
Exemplo n.º 4
0
 def test_name_can_have_digits(self):
     self.assertTrue(misc.is_valid_attribute_name('fo12'))
Exemplo n.º 5
0
 def test_name_cannot_start_with_digit(self):
     self.assertFalse(misc.is_valid_attribute_name('1z'))
Exemplo n.º 6
0
 def test_name_can_be_longer(self):
     self.assertTrue(misc.is_valid_attribute_name('foobarbaz'))
Exemplo n.º 7
0
 def test_name_can_be_longer(self):
     self.assertTrue(misc.is_valid_attribute_name('foobarbaz'))
Exemplo n.º 8
0
 def test_self_can_be_allowed(self):
     self.assertTrue(
         misc.is_valid_attribute_name('self', allow_self=True))
Exemplo n.º 9
0
 def test_no_unicode_please(self):
     self.assertFalse(misc.is_valid_attribute_name('mañana'))
Exemplo n.º 10
0
 def test_hidden_names_can_be_allowed(self):
     self.assertTrue(
         misc.is_valid_attribute_name('_z', allow_hidden=True))
Exemplo n.º 11
0
 def test_self_is_forbidden(self):
     self.assertFalse(misc.is_valid_attribute_name('self'))
Exemplo n.º 12
0
 def test_hidden_names_are_forbidden(self):
     self.assertFalse(misc.is_valid_attribute_name('_z'))
Exemplo n.º 13
0
 def test_name_cannot_start_with_digit(self):
     self.assertFalse(misc.is_valid_attribute_name('1z'))
Exemplo n.º 14
0
 def test_name_can_have_digits(self):
     self.assertTrue(misc.is_valid_attribute_name('fo12'))
Exemplo n.º 15
0
 def test_self_can_be_allowed(self):
     self.assertTrue(
         misc.is_valid_attribute_name('self', allow_self=True))
Exemplo n.º 16
0
 def test_a_is_ok(self):
     self.assertTrue(misc.is_valid_attribute_name('a'))
Exemplo n.º 17
0
 def test_no_unicode_please(self):
     self.assertFalse(misc.is_valid_attribute_name('mañana'))
Exemplo n.º 18
0
 def test_a_is_ok(self):
     self.assertTrue(misc.is_valid_attribute_name('a'))