Commit c9da4203 authored by Joshua Roesslein's avatar Joshua Roesslein
Browse files

Setup tests for Travis.

- For pull requests use HTTP records to replay traffic.
- For master use the encrypted oAuth keys like normal.
parent 4da98dee
---
script: nosetests -v tests.test_api tests.test_streaming tests.test_cursors
language: python
python:
- "2.7"
install:
- pip install -r test_requirements.txt
script: ./run_tests.sh
env:
global:
- TWITTER_USERNAME="tweepytest"
......@@ -20,8 +24,4 @@ env:
nKkytraqLGUm33K1GpwkjOyxACDHYw4GMvOGyDwVTX7VNwqxbkUojB7qXYoQ
JjlEyFWS487IFteR87U9pt18qongJJIphaBdT9/lDVLsMWZ0Jh5ZLQfX+2jS
aF2UwsrYkzBUMrqMqYCc2+X6CuswLEZTVXDAlNh+emvhxZ5faMI=
python:
- "2.7"
branches:
only:
- master
#! /usr/bin/env bash
if [[ $TRAVIS_SECURE_ENV_VARS == "false" ]]; then
USE_REPLAY=1 nosetests -v tests.test_api
else
nosetests -v tests.test_api tests.test_streaming tests.test_cursors
fi
......@@ -2,10 +2,6 @@
#from distutils.core import setup
from setuptools import setup, find_packages
from tweepy import __version__
from pip.req import parse_requirements
install_reqs = parse_requirements('requirements.txt')
reqs = [str(req.req) for req in install_reqs]
setup(name="tweepy",
version=__version__,
......@@ -15,6 +11,5 @@ setup(name="tweepy",
author_email="tweepy@googlegroups.com",
url="http://github.com/tweepy/tweepy",
packages = find_packages(),
install_requires=reqs,
keywords= "twitter library",
zip_safe = True)
......@@ -7,7 +7,7 @@ from httreplay.utils import filter_headers_key
from tweepy.auth import OAuthHandler
from tweepy.api import API
username = os.environ.get('TWITTER_USERNAME', '')
username = os.environ.get('TWITTER_USERNAME', 'tweepytest')
oauth_consumer_key = os.environ.get('CONSUMER_KEY', '')
oauth_consumer_secret = os.environ.get('CONSUMER_SECRET', '')
oauth_token = os.environ.get('ACCESS_KEY', '')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment