예제 #1
0
 def test_add_job(self):
     data = {
         'id': 1001,
         'title': '招聘绅士hentai',
         'work_year': 3,
         'city_id': 2,
         'company_id': 11,
         'department': '二次元部门',
         'salary': '60k-100k',
         'education': 2,
         'description': '这是JD这是JD这是JD这是JD这是JD这是JD',
         'advantage': '有妹子',
         'job_nature': 2,
         'created_at': 1494957220,
     }
     JobModel.add(**data)
     jobs = JobModel.list()
     self.assertEqual(len(jobs), 3)
     job = JobModel.get(job_id=1001)
     for (key, value) in data.items():
         self.assertEqual(getattr(job, key), value)
예제 #2
0
 def test_get_job(self):
     job = JobModel.get(job_id=6814)
     self.assertEqual(job.id, 6814)
     self.assertEqual(job.title, 'web前端')