8000 Fix python 3 tests & Release 0.5 · dahlia/github3.py@4347dad · GitHub
[go: up one dir, main page]

Skip to content

Commit 4347dad

Browse files
committed
Fix python 3 tests & Release 0.5
1 parent 34cb385 commit 4347dad

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

HISTORY.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
History/Changelog
22
=================
33

4-
0.5: 2013-xx-xx
4+
0.5: 2013-02-16
55
---------------
66

7+
- 100% (mock) test coverage
8+
79
- Add support for the announced_ meta_ endpoint.
810

911
- Add support for conditional refreshing, e.g.,
@@ -37,7 +39,6 @@ History/Changelog
3739
And the second call will only give you the new repositories since the last
3840
request. This mimics behavior in `pengwynn/octokit`_
3941

40-
4142
- Add support for `sortable stars`_.
4243

4344
- In github3.users.User, ``iter_keys`` now allows you to iterate over **any**

tests/test_github.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,11 @@ def test_markdown(self):
527527
}
528528
)
529529

530-
expect(self.g.markdown('Foo', 'gfm', 'sigmavirus24/cfg')) == (
531-
b'archive_data'
532-
)
530+
expect(
531+
self.g.markdown(
532+
'Foo', 'gfm', 'sigmavirus24/cfg'
533+
).startswith(b'archive_data')
534+
).is_True()
533535
self.mock_assertions()
534536

535537
self.post('https://api.github.com/markdown/raw')
@@ -799,7 +801,7 @@ def test_zen(self):
799801
self.response('archive')
800802
self.get('https://api.github.com/zen')
801803

802-
expect(self.g.zen()) == b'archive_data'
804+
expect(self.g.zen().startswith(b'archive_data')).is_True()
803805
self.mock_assertions()
804806

805807

tests/test_repos.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,15 +1218,15 @@ def test_diff(self):
12181218
self.get(self.api)
12191219
self.conf.update(headers={'Accept': 'application/vnd.github.diff'})
12201220

1221-
expect(self.commit.diff()) == b'archive_data'
1221+
expect(self.commit.diff().startswith(b'archive_data')).is_True()
12221222
self.mock_assertions()
12231223

12241224
def test_patch(self):
12251225
self.response('archive', 200)
12261226
self.get(self.api)
12271227
self.conf.update(headers={'Accept': 'application/vnd.github.patch'})
12281228

1229-
expect(self.commit.patch()) == b'archive_data'
1229+
expect(self.commit.patch().startswith(b'archive_data')).is_True()
12301230
self.mock_assertions()
12311231

12321232

@@ -1246,13 +1246,13 @@ def test_diff(self):
12461246
self.get(self.api)
12471247
self.conf.update(headers={'Accept': 'application/vnd.github.diff'})
12481248

1249-
expect(self.comp.diff()) == b'archive_data'
1249+
expect(self.comp.diff().startswith(b'archive_data')).is_True()
12501250
self.mock_assertions()
12511251

12521252
def test_patch(self):
12531253
self.response('archive', 200)
12541254
self.get(self.api)
12551255
self.conf.update(headers={'Accept': 'application/vnd.github.patch'})
12561256

1257-
expect(self.comp.patch()) == b'archive_data'
1257+
expect(self.comp.patch().startswith(b'archive_data')).is_True()
12581258
self.mock_assertions()

0 commit comments

Comments
 (0)
0