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 1164450 point at it.

Added r.json documentation (document ALL the awesome features!)Danilo Bargenbefore adoption1164450

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

Added r.json documentation (document ALL the awesome features!)Danilo Bargenbefore adoption1164450

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

Added r.json documentation (document ALL the awesome features!)Danilo Bargenbefore adoption1164450

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()