def test_get_manifest_with_id(self): manifests = SQLStore.get_manifest(manifest_id=self.test_model.id) self.assertGreater(len(manifests), 0) self.assertIsInstance(manifests[0], Manifest)
def test_get_manifest_with_id_as_none(self): manifests = SQLStore.get_manifest(manifest_id=None) self.assertNotEqual(manifests, [])
def test_get_manifest_with_plan_id(self): result = SQLStore.get_manifest(manifest_id=None, plan_id=self.test_model.plan_id) self.assertGreater(len(result), 0) self.assertIsInstance(result[0], Manifest)
def test_get_manifest_with_id_and_not_found(self, mock_exists_in_db): mock_exists_in_db.return_value = False manifests = SQLStore.get_manifest(self.test_model.id) self.assertEqual(manifests, [])
def test_get_manifest_with_manifest_id_and_plan_id(self): with self.assertRaises(Exception): SQLStore.get_manifest(manifest_id=self.test_model.id, plan_id=self.test_model.plan_id)