def testGeoreferenceConfirmCall_failWrongParams_Missing(self):
     params = {'mtbid': 71055044}
     request = self.getRequestWithAuthentification(params)
     view = GeoreferenceConfirm(request)
     result = view.__call__()
     print "Test: testGeoreferenceConfirmCall_failWrongParams_Missing - Result %s" % result
     self.assertEqual(400, result.status_code)
 def testGeoreferenceConfirmCall_failWrongParams_Missing(self):
     params = {'mtbid':71055044}
     request = self.getRequestWithAuthentification(params)
     view = GeoreferenceConfirm(request)
     result = view.__call__()
     print "Test: testGeoreferenceConfirmCall_failWrongParams_Missing - Result %s"%result
     self.assertEqual(400, result.status_code)  
 def testGeoreferenceConfirmCall_failWrongParams_Syntax(self):
     params = {'mtbid':71055044, 'pointss':'7440:7246,7280:1534,1216:1454,816:7342'}
     request = self.getRequestWithAuthentification(params)
     view = GeoreferenceConfirm(request)
     result = view.__call__()
     print "Test: testGeoreferenceConfirmCall_failWrongParams_Syntax - Result %s"%result
     self.assertEqual(400, result.status_code)
 def testGeoreferenceConfirmCall_failWrongParams_Syntax(self):
     params = {
         'mtbid': 71055044,
         'pointss': '7440:7246,7280:1534,1216:1454,816:7342'
     }
     request = self.getRequestWithAuthentification(params)
     view = GeoreferenceConfirm(request)
     result = view.__call__()
     print "Test: testGeoreferenceConfirmCall_failWrongParams_Syntax - Result %s" % result
     self.assertEqual(400, result.status_code)
 def testGeoreferenceConfirmCall_pass(self):
     params = {'mtbid':71055044, 'points':'7440:7246,7280:1534,1216:1454,816:7342'}
     request = self.getRequestWithAuthentification(params)
     view = GeoreferenceConfirm(request)
     result = view.__call__()
     print "Test: testGeoreferenceConfirmCall_pass - Result %s"%result
     resultJson = json.loads(result)
     self.assertTrue('message' in result)
     self.assertEqual("Georeference parameter saved!", resultJson['message'])
     self.assertTrue('georefid' in result)
 def testGeoreferenceConfirmCall_failWrongParams_SyntaxMissing(self):
     try:
         georefid = self.createDummyGeorefProcess()
         params = {'mtbid': 71055044}
         request = self.getRequestWithAuthentification(params)
         view = GeoreferenceConfirm(request)
         result = view.__call__()
         print "Test: testGeoreferenceConfirmCall_short_failWrongParams_Syntax - Result %s" % result
         self.assertEqual(400, result.status_code)
     except:
         raise
     finally:
         self.deleteDummyGeorefProcess(georefid)
 def testGeoreferenceConfirmCall_failWrongParams_SyntaxMissing(self):
     try:
         georefid = self.createDummyGeorefProcess()
         params = {'mtbid':71055044}
         request = self.getRequestWithAuthentification(params)
         view = GeoreferenceConfirm(request)
         result = view.__call__()
         print "Test: testGeoreferenceConfirmCall_short_failWrongParams_Syntax - Result %s"%result
         self.assertEqual(400, result.status_code)
     except:
         raise
     finally:
         self.deleteDummyGeorefProcess(georefid)          
 def testGeoreferenceConfirmCall_pass(self):
     params = {
         'mtbid': 71055044,
         'points': '7440:7246,7280:1534,1216:1454,816:7342'
     }
     request = self.getRequestWithAuthentification(params)
     view = GeoreferenceConfirm(request)
     result = view.__call__()
     print "Test: testGeoreferenceConfirmCall_pass - Result %s" % result
     resultJson = json.loads(result)
     self.assertTrue('message' in result)
     self.assertEqual("Georeference parameter saved!",
                      resultJson['message'])
     self.assertTrue('georefid' in result)
 def testGeoreferenceConfirmCall_pass_WrongMtbid(self):
     georefid = ''
     try:
         georefid = self.createDummyGeorefProcess()
         params = {'georefid':georefid, 'mtbid':71055045}
         request = self.getRequestWithAuthentification(params)
         view = GeoreferenceConfirm(request)
         result = view.__call__()
         print "Test: testGeoreferenceConfirmCall_short_pass_WrongMtbid - Result %s"%result
         resultJson = json.loads(result)
         self.assertTrue('message' in result)
         self.assertEqual("Change validation status for georeference process!", resultJson['message'])
         self.assertTrue('georefid' in result)
     except:
         raise
     finally:
         self.deleteDummyGeorefProcess(georefid)
 def testGeoreferenceConfirmCall_pass_WrongMtbid(self):
     georefid = ''
     try:
         georefid = self.createDummyGeorefProcess()
         params = {'georefid': georefid, 'mtbid': 71055045}
         request = self.getRequestWithAuthentification(params)
         view = GeoreferenceConfirm(request)
         result = view.__call__()
         print "Test: testGeoreferenceConfirmCall_short_pass_WrongMtbid - Result %s" % result
         resultJson = json.loads(result)
         self.assertTrue('message' in result)
         self.assertEqual(
             "Change validation status for georeference process!",
             resultJson['message'])
         self.assertTrue('georefid' in result)
     except:
         raise
     finally:
         self.deleteDummyGeorefProcess(georefid)