예제 #1
0
    def import_from_adzuna(self, job_area, count):
        """
        Method to import jobs from the Adzuna API
        """
        locations = job_area.locations
        args = list(locations) + [count]

        az = Adzuna()
        all_jobs = az.jobs_at_location(*args)
        for job in all_jobs:
            obj, created = JobAdvert.get_or_create_from_adzuna(job_area, job)
            if not created:
                break
예제 #2
0
    def import_from_adzuna(self, job_area, count):
        """
        Method to import jobs from the Adzuna API
        """
        locations = job_area.locations
        args = list(locations) + [count]

        az = Adzuna()
        all_jobs = az.jobs_at_location(*args)
        for job in all_jobs:
            obj, created = JobAdvert.get_or_create_from_adzuna(job_area, job)
            if not created:
                break
예제 #3
0
 def test_jobs_at_location(self):
     az = Adzuna()
     x = az.jobs_at_location('UK', 'London', 'South East London', 15)
     self.assertEqual(len(list(x)), 15)
예제 #4
0
 def test_jobs_at_location(self):
     az = Adzuna()
     x = az.jobs_at_location('UK', 'London', 'South East London', 15)
     self.assertEqual(len(list(x)), 15)