Example #1
0
	def test_get_pending_scans_not_empty(self):
		acc = Account()
		acc.user = self.user

		fake_task_id = str(uuid4())
		run = ScanRun.objects.create_pending_scan_run(self.inert, fake_task_id)
		pending = acc.get_pending_scans()
		#  pending == ['<ScanRun: 3 2013-08-19 14:37:56.165701+00:00>']
		self.assertTrue(isinstance(pending[0], ScanRun),
		                msg='Pending scan object is not of instance of ScanRun: {0}'.format(pending[0]))
Example #2
0
	def test_get_pending_scans_empty(self):
		acc = Account()
		acc.user = self.user
		pending = acc.get_pending_scans()
		self.assertQuerysetEqual(pending, [])