Skip to content

Instantly share code, notes, and snippets.

View mjkrause's full-sized avatar
🎯
Focusing

Michael Krause mjkrause

🎯
Focusing
  • Santa Cruz, CA
View GitHub Profile
@ghl3
ghl3 / Makefile
Created November 29, 2012 14:26
Makefile for python unittest
RUNTEST=python -m unittest -v -b
ALLMODULES=$(patsubst %.py, %, $(wildcard test_*.py))
all:
${RUNTEST} ${ALLMODULES}
% : test_%.py
${RUNTEST} test_$@
@evansde77
evansde77 / mock_requests.py
Last active May 30, 2024 10:11
Example of mocking requests calls
#!/usr/bin/env python
"""
mocking requests calls
"""
import mock
import unittest
import requests
from requests.exceptions import HTTPError