Beispiel #1
0
 def test_avatar_field_label(self):
     form = StudentProfileForm()
     label = form.fields['avatar'].label
     self.assertTrue(label == None or label == '头像')
Beispiel #2
0
 def test_briefintroduction_field_label(self):
     form = StudentProfileForm()
     label = form.fields['briefintroduction'].label
     max_length = form.fields['briefintroduction'].max_length
     self.assertTrue(label == None or label == '学生信息')
     self.assertEqual(max_length, 100)
Beispiel #3
0
 def test_mailbox_field_label(self):
     form = StudentProfileForm()
     label = form.fields['mailbox'].label
     self.assertTrue(label == None or label == '个人邮箱')
Beispiel #4
0
 def test_phone_field(self):
     form = StudentProfileForm()
     label = form.fields['phone'].label
     max_length = form.fields['phone'].max_length
     self.assertTrue(label == None or label == '联系电话')
     self.assertEqual(max_length, 12)
Beispiel #5
0
 def test_grade_field_label(self):
     form = StudentProfileForm()
     label = form.fields['grade'].label
     self.assertTrue(label == None or label == '年级')
Beispiel #6
0
 def test_gender_field_label(self):
     form = StudentProfileForm()
     label = form.fields['gender'].label
     self.assertTrue(label == None or label == '性别')
Beispiel #7
0
 def test_name_field(self):
     form = StudentProfileForm()
     label = form.fields['name'].label
     max_length = form.fields['name'].max_length
     self.assertTrue(label == None or label == '姓名')
     self.assertEqual(max_length, 100)