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