8000 XFail some integration tests by sigmavirus24 · Pull Request #652 · sigmavirus24/github3.py · GitHub
[go: up one dir, main page]

Skip to content

XFail some integration tests #652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions github3/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def enterprise_login(username=None, password=None, token=None, url=None,

def emojis():
return gh.emojis()


emojis.__doc__ = gh.emojis.__doc__


Expand Down Expand Up @@ -401,6 +403,8 @@ def octocat(say=None):

def organization(name):
return gh.organization(name)


organization.__doc__ = gh.organization.__doc__


Expand All @@ -418,11 +422,15 @@ def pull_request(owner, repository, number):

def rate_limit():
return gh.rate_limit()


rate_limit.__doc__ = gh.rate_limit.__doc__


def repository(owner, repository):
return gh.repository(owner, repository)


repository.__doc__ = gh.repository.__doc__


Expand Down Expand Up @@ -636,6 +644,8 @@ def search_users(query, sort=None, order=None, per_page=None,

def user(username):
return gh.user(username)


user.__doc__ = gh.user.__doc__


Expand Down
1 change: 1 addition & 0 deletions github3/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def generate_fake_error_response(msg, status_code=401, encoding='utf-8'):
r._content = r.raw.read()
return r


# Use mock decorators when generating documentation, so all functino signatures
# are displayed correctly
if os.getenv('GENERATING_DOCUMENTATION', None) == 'github3':
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/test_orgs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
"""Integration tests for methods implemented on Organization."""
import pytest
import requests

import github3

Expand Down Expand Up @@ -93,6 +94,8 @@ def test_edit(self):

assert o.edit(location='Madison, WI') is True

@pytest.mark.xfail(requests.__build__ >= 0x021100,
reason="Requests 2.11.0 breaks our cassettes.")
def test_is_member(self):
"""Test the ability to check if a User is a member of the org."""
cassette_name = self.cassette_name('is_member')
Expand Down
6 changes: 6 additions & 0 deletions tests/integration/test_repos_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
import os
import tempfile

import pytest
import requests

from .helper import IntegrationHelper


class TestRelease(IntegrationHelper):

@pytest.mark.xfail(requests.__build__ >= 0x021100,
reason="Requests 2.11.0 breaks our cassettes")
def test_archive(self):
"""Test the ability to download a release archive."""
cassette_name = self.cassette_name('archive')
Expand Down
3 changes: 3 additions & 0 deletions tests/integration/test_repos_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import github3.exceptions as exc

import pytest
import requests

from . import helper

Expand Down Expand Up @@ -472,6 +473,8 @@ def test_deployments(self):
for d in repository.deployments():
assert isinstance(d, github3.repos.deployment.Deployment)

@pytest.mark.xfail(requests.__build__ >= 0x021100,
reason="Requests breaks our recorded cassettes")
def test_directory_contents(self):
"""Test that a directory's contents can be retrieved."""
cassette_name = self.cassette_name('directory_contents')
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def url_for(path=''):
"""Simple function to generate URLs with the base GitHub URL."""
return 'https://api.github.com/' + path.strip('/')


enterprise_url_for = helper.create_url_helper('https://enterprise.github3.com')


Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def test_boolean_raises_exception(self):
"""Verify boolean tests for response codes correctly."""
response = requests.Response()
response.status_code = 512
response.raw = io.BytesIO()
with pytest.raises(exceptions.GitHubError):
self.instance._boolean(response=response,
true_code=200,
Expand Down
0