mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-10-30 14:49:14 +00:00
17 lines
382 B
Python
17 lines
382 B
Python
import unittest
|
|
|
|
import requests
|
|
|
|
|
|
class CustomCATests(unittest.TestCase):
|
|
def test_valid_self_signed(self):
|
|
self.assertEqual(requests.get("https://self.test").text, "ok")
|
|
|
|
def test_invalid_self_signed(self):
|
|
with self.assertRaises(requests.exceptions.SSLError):
|
|
requests.get("https://fail.test")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|