Exemple #1
0
 def test_create_jobposting_minimal(self):
     '''This is a test for creating a new ::class:`JobPosting` object, with only the minimum fields being entered'''
     test_jobposting = JobPosting(title = 'Postdoctoral Researcher',
                           description = 'Some description',
                           link = 'http:/jobs.com/awesomejob',
                           active=True)
     test_jobposting.save()
     self.assertEqual(test_jobposting.pk, 1)    
Exemple #2
0
 def test_jobposting_unicode(self):
     '''This test creates a new :class:`~personnel.models.JobPosting` object, then tests for the unicode representation of it.'''
     test_jobposting = JobPosting(title = 'Postdoctoral Researcher',
                           description = 'Some description',
                           link = 'http:/jobs.com/awesomejob',
                           active=True)
     test_jobposting.save()
     self.assertEqual(test_jobposting.__unicode__(), 'Postdoctoral Researcher Job Posting (%s)' %(datetime.date.today()) )
Exemple #3
0
 def test_create_jobposting_all(self):
     '''This is a test for creating a new ::class:`JobPosting` object, with only the minimum fields being entered'''
     test_jobposting = JobPosting(title = 'Postdoctoral Researcher',
                           description = 'Some description',
                           link = 'http:/jobs.com/awesomejob',
                           hiringOrganization = Organization.objects.get(pk=1),
                           education = "An educational requirement",
                           qualifications = "Some qualifications",
                           responsibilities = "Some responsibilities",
                           active = True)
     test_jobposting.save()
     self.assertEqual(test_jobposting.pk, 1)