Lines Matching refs:models
8 from autotest_lib.frontend.afe import models, model_attributes, model_logic
31 everyone_acl = models.AclGroup.objects.get(name='Everyone')
38 models.AclGroup.on_host_membership_change()
58 host = models.Host.create_one_time_host('othost')
60 self.assertEquals(host.status, models.Host.Status.READY)
62 host.status = models.Host.Status.RUNNING
65 host2 = models.Host.add_object(hostname='othost')
67 self.assertEquals(host2.status, models.Host.Status.RUNNING)
81 return models.SpecialTask.objects.create(
82 host=self.hosts[0], task=models.SpecialTask.Task.VERIFY,
83 requested_by=models.User.current_user())
123 task = models.SpecialTask.objects.create(
124 host=self.hosts[0], task=models.SpecialTask.Task.VERIFY,
161 self.assertTrue(models.Host.objects.get(id=self.hosts[0].id))
168 hosts = models.Host.objects.all()
185 hosts = models.Host.objects.all().filter(hostname__in=to_delete)
187 all_hosts = models.Host.objects.all()
203 self.assertEqual(1, models.Job.objects.all().count())
206 self.assertEqual(0, models.Job.objects.all().count())
213 self.assertEqual(2, models.Job.objects.all().count())
215 models.Job.objects.all().delete()
216 self.assertEqual(0, models.Job.objects.all().count())
229 self.assertEqual(None, models.Kernel.create_kernels(None))
233 self.god.stub_function(models.Kernel, '_create')
240 models.Kernel._create.expect_call(kernel).and_return(response)
241 self.assertEqual(result, models.Kernel.create_kernels(kernel_list))
246 kernel = models.Kernel._create({'version': 'version'})
249 self.assertEqual(kernel, models.Kernel._create({'version': 'version'}))
266 test = models.Test.objects.create(
270 parameterized_job = models.ParameterizedJob.objects.create(test=test)
287 self.assertRaises(Exception, models.Job.check_parameterized_job,
292 self.assertRaises(Exception, models.Job.check_parameterized_job,
297 self.assertRaises(Exception, models.Job.check_parameterized_job,
304 self.assertRaises(Exception, models.Job.check_parameterized_job,
582 hosts = [models.Host.deserialize(host) for host in hosts_serialized]
583 jobs = [models.Job.deserialize(job) for job in jobs_serialized]
622 models.Job.deserialize(serialized)
624 job = models.Job.objects.get(pk=job.id)