def test_custom_testrun(self):
     testrun = TestRun(project_id=DEFAULT_PROJ, test_run_id=TEST_RUN_ID)
     self.assertIsNotNone(testrun.arch)
     with self.assertRaises(PylarionLibException):
         testrun.arch = "bad"
     valid_values = testrun.get_valid_field_values("arch")
     testrun.arch = valid_values[0]
     self.assertEqual(valid_values[0], testrun.arch)
 def test_custom_testrun2(self):
     """this test does the following:
     * Instantiate an empty test run.
     * verify that the custom field exists and is None
     * test an invalid value
     * test a valid value
     * verify that it saves it in the attribute
     """
     testrun = TestRun()
     self.assertIsNone(testrun.arch)
     with self.assertRaises(PylarionLibException):
         testrun.arch = "bad"
     valid_values = testrun.get_valid_field_values("arch")
     testrun.arch = valid_values[0]
     self.assertEqual(valid_values[0], testrun.arch)