Skip to content
Myr

test_requests_https.py

This file

Path

tests/test_requests_https.py

32 lines · 736 bytes · Python

Last changed by

Merge remote-tracking branch 'origin/develop' into developKenneth Reitzbefore adoptiona74c6c6

History of this file

Take it

The walk stopped after 200 commits: lines older than 2f50cb9 point at it.

Merge pull request #613 from surajbarkale/patch-1Kenneth Reitzbefore adoption2f50cb9

lines 1–3why, one step back
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-3

Merge remote-tracking branch 'origin/develop' into developKenneth Reitzbefore adoptiona74c6c6

lines 4–5why, one step back
4import os
5import sys

Merge pull request #613 from surajbarkale/patch-1Kenneth Reitzbefore adoption2f50cb9

lines 6–11why, one step back
6import unittest
78# Path hack.9sys.path.insert(0, os.path.abspath('..'))10import requests11

Merge pull request #786 from Locker537/lint_fixKenneth Reitzbefore adoption27f34a5

line 12why, one step back
12

Merge pull request #613 from surajbarkale/patch-1Kenneth Reitzbefore adoption2f50cb9

lines 13–32why, one step back
13class HTTPSTest(unittest.TestCase):
14 """Smoke test for https functionality."""1516 smoke_url = "https://github.com"1718 def perform_smoke_test(self, verify=False):19 result = requests.get(self.smoke_url, verify=verify)20 self.assertEqual(result.status_code, 200)2122 def test_smoke(self):23 """Smoke test without verification."""24 self.perform_smoke_test(verify=False)2526 def test_smoke_verified(self):27 """Smoke test with SSL verification."""28 self.perform_smoke_test(verify=True)293031if __name__ == '__main__':32 unittest.main()