Skip to content

Commit 4fe4e0b

Browse files
author
Leah Jones
committed
Adds a travis.yml file to get Travis CI integration working
1 parent 3bc7935 commit 4fe4e0b

5 files changed

Lines changed: 32 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.pyc
22
.cache
33
.idea
4+
dist
45
slackclient.egg-info

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
language: python
2+
python:
3+
- "2.6"
4+
- "2.7"
5+
- "3.2"
6+
- "3.3"
7+
- "3.4"
8+
- "3.5"
9+
install: "python setup.py install"
10+
script: py.test

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
python-slackclient
22
================
3+
4+
[![Build Status](https://travis-ci.org/slackhq/python-slackclient.svg?branch=master)](https://travis-ci.org/slackhq/python-slackclient)
5+
36
A basic client for Slack.com, which can optionally connect to the Slack Real Time Messaging (RTM) API.
47

58
Overview

_pytest/conftest.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
import pytest
2+
import requests
23
from slackclient._channel import Channel
34
from slackclient._server import Server
45
from slackclient._client import SlackClient
56

7+
8+
# This is so that tests work on Travis for python 2.6, it's really hacky, but expedient
9+
def get_unverified_post():
10+
requests_post = requests.post
11+
12+
def unverified_post(*args, **kwargs):
13+
# don't throw SSL errors plz
14+
kwargs['verify'] = False
15+
return requests_post(*args, **kwargs)
16+
17+
return unverified_post
18+
19+
requests.post = get_unverified_post()
20+
21+
622
@pytest.fixture
723
def server(monkeypatch):
824
myserver = Server('xoxp-1234123412341234-12341234-1234', False)

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
websocket-client==0.35.0
21
future==0.15.2
2+
pytest==2.8.7
3+
websocket-client==0.35.0

0 commit comments

Comments
 (0)