def test_fields_apply_link(self): jobpost = JobPost() <placeholder> jobpost.apply_link = <placeholder> jobpost.save() record = JobPost.objects.get(apply_link=<placeholder>) self.assertEqual(record.apply_link, <placeholder>)
def test_fields_job_description(self): jobpost = JobPost() <placeholder> jobpost.job_description = <placeholder> jobpost.save() record = JobPost.objects.get(job_description=<placeholder>) self.assertEqual(record.job_description, <placeholder>)
def test_fields_job_title(self): jobpost = JobPost() <placeholder> jobpost.job_title = <placeholder> jobpost.save() record = JobPost.objects.get(job_title=<placeholder>) self.assertEqual(record.job_title, <placeholder>)
def test_fields_date_posted(self): jobpost = JobPost() <placeholder> jobpost.date_posted = <placeholder> jobpost.save() record = JobPost.objects.get(date_posted=<placeholder>) self.assertEqual(record.date_posted, <placeholder>)
def setUp (self): self.data = { "job_post":{ "job_title":"CharField", "date_posted":"DateField", "apply_link":"URLField", "job_description":"CharField", }, "company":{ "company_name":"CharField", "hiring_from":"CharField", }, } self.jobpost = JobPost() self.jobpost.job_title = self.data['job_post']['job_title'] self.jobpost.date_posted = self.data['job_post']['date_posted'] self.jobpost.apply_link = self.data['job_post']['apply_link'] self.jobpost.job_description = self.data['job_post']['job_description'] self.jobpost.save() self.company = Company() self.company.company_name = self.data['company']['company_name'] self.company.hiring_from = self.data['company']['hiring_from'] self.company.save()
def setUp (self): self.data = { "job_post":{ "job_title":"CharField", "date_posted":"DateField", "apply_link":"URLField", "job_description":"CharField", }, "technology":{ "technology_name":"CharField", }, } self.jobpost = JobPost() self.jobpost.job_title = self.data['job_post']['job_title'] self.jobpost.date_posted = self.data['job_post']['date_posted'] self.jobpost.apply_link = self.data['job_post']['apply_link'] self.jobpost.job_description = self.data['job_post']['job_description'] self.jobpost.save() self.technology = Technology() self.technology.technology_name = self.data['technology']['technology_name'] self.technology.save()
def setUp (self): self.data = { "job_post":{ "job_title":"CharField", "date_posted":"DateField", "apply_link":"URLField", "job_description":"CharField", }, "scrape":{ "scrape_datetime":"DateTimeField", "entries_scraped":"IntegerField", "scrape_duration":"DurationField", "scrape_success":"BooleanField", }, } self.jobpost = JobPost() self.jobpost.job_title = self.data['job_post']['job_title'] self.jobpost.date_posted = self.data['job_post']['date_posted'] self.jobpost.apply_link = self.data['job_post']['apply_link'] self.jobpost.job_description = self.data['job_post']['job_description'] self.jobpost.save() self.scrape = Scrape() self.scrape.scrape_datetime = self.data['scrape']['scrape_datetime'] self.scrape.entries_scraped = self.data['scrape']['entries_scraped'] self.scrape.scrape_duration = self.data['scrape']['scrape_duration'] self.scrape.scrape_success = self.data['scrape']['scrape_success'] self.scrape.save()
def setUp (self): self.data = { "job_post":{ "job_title":"CharField", "date_posted":"DateField", "apply_link":"URLField", "job_description":"CharField", }, "listing_tag":{ "listingtag_name":"CharField", }, } self.jobpost = JobPost() self.jobpost.job_title = self.data['job_post']['job_title'] self.jobpost.date_posted = self.data['job_post']['date_posted'] self.jobpost.apply_link = self.data['job_post']['apply_link'] self.jobpost.job_description = self.data['job_post']['job_description'] self.jobpost.save() self.listingtag = ListingTag() self.listingtag.listingtag_name = self.data['listing_tag']['listingtag_name'] self.listingtag.save()
def test_is_instance(self): thing = JobPost() self.assertTrue(isinstance(thing, JobPost))