示例#1
0
文件: tests.py 项目: aw1n/needanerd
 def testDegreeWithoutResume(self):
     form_data = {
         'major': 'Computer Science',
         'university': 'Auburn University'
     }
     form = DegreeForm(data=form_data)
     self.assertEqual(form.is_valid(), True)
示例#2
0
文件: tests.py 项目: aw1n/needanerd
 def testDegreeUniversity32Chars(self):
     form_data = {
         'resume': self.resume,
         'university': '12345678901234567890123456789012',
         'major': 'Computer Science'
     }
     form = DegreeForm(data=form_data)
     self.assertEqual(form.is_valid(), True)
示例#3
0
文件: tests.py 项目: aw1n/needanerd
 def testDegreeMajor32Chars(self):
     form_data = {
         'resume': self.resume,
         'major': '12345678901234567890123456789012',
         'university': 'Auburn University'
     }
     form = DegreeForm(data=form_data)
     self.assertEqual(form.is_valid(), True)
示例#4
0
文件: tests.py 项目: aw1n/needanerd
 def testDegree(self):
     form_data = {
         'resume': self.resume,
         'university': 'Auburn',
         'major': 'Computer Science',
         'date': '12/31/2004',
         'gpa': '4.0',
         'honors': 'summa cum laude'
     }
     form = DegreeForm(data=form_data)
     self.assertEqual(form.is_valid(), True)
示例#5
0
文件: tests.py 项目: aw1n/needanerd
 def testDegreeWithoutMajor(self):
     form_data = {'resume': self.resume, 'university': 'Auburn University'}
     form = DegreeForm(data=form_data)
     self.assertEqual(form.is_valid(), False)
示例#6
0
文件: tests.py 项目: aw1n/needanerd
 def testDegreeWithoutUniversity(self):
     form_data = {'resume': self.resume, 'major': 'Computer Science'}
     form = DegreeForm(data=form_data)
     self.assertEqual(form.is_valid(), False)