This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# adapted from https://gist.github.com/iMilnb/75d65d88ce649b1f191a | |
import ConfigParser | |
import mechanize | |
import os | |
CONFIG = os.environ.get('SPAMCOP_CONFIG', | |
os.path.expanduser('~/secret/spamcop-config.ini')) | |
config = ConfigParser.SafeConfigParser() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on https://gist.github.com/asfaltboy/b3e6f9b5d95af8ba2cc46f2ba6eae5e2 | |
# based on https://gist.github.com/blueyed/4fb0a807104551f103e6 | |
from django.db import connection | |
from django.db.migrations.executor import MigrationExecutor | |
from django.core.management import call_command | |
import pytest | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
A replacement transport for Python xmlrpc library. | |
Usage: | |
>>> import xmlrpclib | |
>>> from transport import RequestsTransport | |
>>> s = xmlrpclib.ServerProxy('http://yoursite.com/xmlrpc', transport=RequestsTransport()) | |
>>> s.demo.sayHello() |