Пример #1
0
 def _test_both_without_auth_and_with_auth_dont_work(
         self, mock_request, mock_parse_section):
     received_msg = triplestore.status()
     msg1 = "Virtuoso connection authenticated [USER:PASSWORD] | FAILED | url | Status code: 401. Message: "
     msg2 = "Virtuoso connection not-authenticated | FAILED | url | Status code: 401. Message: "
     expected_msg = "<br>".join([msg1, msg2])
     self.assertEqual(received_msg, expected_msg)
Пример #2
0
 def test_both_without_auth_and_with_auth_work(self, mock_request,
                                               mock_parse_section, log):
     received_msg = triplestore.status()
     msg1 = 'Virtuoso connection authenticated [USER:PASSWORD] | SUCCEED | url'
     msg2 = 'Virtuoso connection not-authenticated | SUCCEED | url'
     expected_msg = "<br>".join([msg1, msg2])
     self.assertEqual(received_msg, expected_msg)
Пример #3
0
 def get(self):
     triplestore_status = triplestore.status()
     event_bus_status = event_bus.status()
     output = []
     if "SUCCEED" not in triplestore_status:
         output.append(triplestore_status)
     if "FAILED" in event_bus_status:
         output.append(event_bus_status)
     if output:
         response = "\n".join(output)
     else:
         response = _(u"WORKING")
     self.write(response)
Пример #4
0
 def get(self):
     triplestore_status = triplestore.status()
     event_bus_status = event_bus.status()
     output = []
     if "SUCCEED" not in triplestore_status:
         output.append(triplestore_status)
     if "FAILED" in event_bus_status:
         output.append(event_bus_status)
     if output:
         response = "\n".join(output)
     else:
         response = _(u"WORKING")
     self.write(response)
Пример #5
0
 def test_both_without_auth_and_with_auth_dont_work(self, mock_request, mock_parse_section):
     received_msg = triplestore.status()
     msg1 = "Virtuoso connection authenticated [USER:PASSWORD] | FAILED | url | Status code: 401. Message: "
     msg2 = "Virtuoso connection not-authenticated | FAILED | url | Status code: 401. Message: "
     expected_msg = "<br>".join([msg1, msg2])
     self.assertEqual(received_msg, expected_msg)
Пример #6
0
 def test_both_without_auth_and_with_auth_work(self, mock_request, mock_parse_section, log):
     received_msg = triplestore.status()
     msg1 = 'Virtuoso connection authenticated [USER:PASSWORD] | SUCCEED | url'
     msg2 = 'Virtuoso connection not-authenticated | SUCCEED | url'
     expected_msg = "<br>".join([msg1, msg2])
     self.assertEqual(received_msg, expected_msg)
Пример #7
0
 def get(self):
     self.write(triplestore.status())
Пример #8
0
 def get(self):
     self.write(triplestore.status())