Esempio n. 1
0
 def test_excludes_with_bad_version(self):
     """
     Test an exclude specifier with an invalid "version_specifier" field value.
     """
     body = {"excludes": PYTHON_INVALID_SPECIFIER_BAD_VERSION}
     task_href = self.client.patch(self.remote['_href'], body)
     update_task = (task for task in api.poll_task(self.cfg, task_href))[0]
     self.assertEquals(update_task['state'], 'failed')
     self.assertDictEqual(self.client.get(self.remote['_href']), self._original_remote)
Esempio n. 2
0
 def test_excludes_with_bad_version(self):
     """
     Test an exclude specifier with an invalid "version_specifier" field value.
     """
     body = {"excludes": PYTHON_INVALID_SPECIFIER_BAD_VERSION}
     task_href = self.client.patch(self.remote['_href'], body)
     update_task = (task for task in api.poll_task(self.cfg, task_href))[0]
     self.assertEqual(update_task['state'], 'failed')
     self.assertDictEqual(self.client.get(self.remote['_href']), self._original_remote)
Esempio n. 3
0
 def test_excludes_with_no_name(self):
     """
     Test an exclude specifier without a "name" field.
     """
     body = {"excludes": PYTHON_INVALID_SPECIFIER_NO_NAME}
     task_href = self.client.patch(self.remote['_href'], body)
     update_task = (task for task in api.poll_task(self.cfg, task_href))[0]
     self.assertEquals(update_task['state'], 'failed')
     self.assertDictEqual(self.client.get(self.remote['_href']), self._original_remote)
Esempio n. 4
0
 def test_excludes_with_no_name(self):
     """
     Test an exclude specifier without a "name" field.
     """
     body = {"excludes": PYTHON_INVALID_SPECIFIER_NO_NAME}
     task_href = self.client.patch(self.remote['_href'], body)
     update_task = (task for task in api.poll_task(self.cfg, task_href))[0]
     self.assertEqual(update_task['state'], 'failed')
     self.assertDictEqual(self.client.get(self.remote['_href']), self._original_remote)