Ejemplo n.º 1
0
 def test_build_get_with_non_exist_id(self):
     try:
         build.get_runs(None, 9999)
     except Fault as f:
         self.assertEqual(f.faultCode, 404, AssertMessage.SHOULD_BE_404)
     else:
         self.fail(AssertMessage.NOT_VALIDATE_ARGS)
Ejemplo n.º 2
0
 def test_build_get_with_non_exist_id(self):
     try:
         build.get_runs(None, 9999)
     except Fault as f:
         self.assertEqual(f.faultCode, 404, AssertMessage.SHOULD_BE_404)
     else:
         self.fail(AssertMessage.NOT_VALIDATE_ARGS)
Ejemplo n.º 3
0
 def test_build_get_with_non_integer(self):
     bad_args = (True, False, (1,), dict(a=1), -1, 0.7, "", "AA")
     for arg in bad_args:
         try:
             build.get_runs(None, arg)
         except Fault as f:
             self.assertEqual(f.faultCode, 400, AssertMessage.SHOULD_BE_400)
         else:
             self.fail(AssertMessage.NOT_VALIDATE_ARGS)
Ejemplo n.º 4
0
 def test_build_get_with_no_args(self):
     bad_args = (None, [], (), {})
     for arg in bad_args:
         try:
             build.get_runs(None, arg)
         except Fault as f:
             self.assertEqual(f.faultCode, 400, AssertMessage.SHOULD_BE_400)
         else:
             self.fail(AssertMessage.NOT_VALIDATE_ARGS)
Ejemplo n.º 5
0
 def test_build_get_with_non_integer(self):
     bad_args = (True, False, (1,), dict(a=1), -1, 0.7, "", "AA")
     for arg in bad_args:
         try:
             build.get_runs(None, arg)
         except Fault as f:
             self.assertEqual(f.faultCode, 400, AssertMessage.SHOULD_BE_400)
         else:
             self.fail(AssertMessage.NOT_VALIDATE_ARGS)
Ejemplo n.º 6
0
 def test_build_get_with_no_args(self):
     bad_args = (None, [], (), {})
     for arg in bad_args:
         try:
             build.get_runs(None, arg)
         except Fault as f:
             self.assertEqual(f.faultCode, 400, AssertMessage.SHOULD_BE_400)
         else:
             self.fail(AssertMessage.NOT_VALIDATE_ARGS)
Ejemplo n.º 7
0
 def test_build_get_with_id(self):
     try:
         b = build.get_runs(None, 5)
     except Fault as f:
         print f.faultString
         self.fail(AssertMessage.UNEXCEPT_ERROR)
     else:
         self.assertIsNotNone(b)
         self.assertEqual(len(b), 1)
         self.assertEqual(b[0]["summary"], "Test run for StarCraft: Init " "on Unknown environment")
Ejemplo n.º 8
0
 def test_build_get_with_id(self):
     try:
         b = build.get_runs(None, 5)
     except Fault as f:
         print f.faultString
         self.fail(AssertMessage.UNEXCEPT_ERROR)
     else:
         self.assertIsNotNone(b)
         self.assertEqual(len(b), 1)
         self.assertEqual(b[0]['summary'], "Test run for StarCraft: Init "
                                           "on Unknown environment")
Ejemplo n.º 9
0
 def test_build_get_with_id(self):
     b = build.get_runs(None, self.build.pk)
     self.assertIsNotNone(b)
     self.assertEqual(len(b), 1)
     self.assertEqual(b[0]['summary'], self.test_run.summary)
Ejemplo n.º 10
0
 def test_build_get_with_id(self):
     b = build.get_runs(None, self.build.pk)
     self.assertIsNotNone(b)
     self.assertEqual(len(b), 1)
     self.assertEqual(b[0]['summary'], self.test_run.summary)