8000 Remove tests that affirm existence and use of Empty · pythonthings/github3.py@6109f33 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6109f33

Browse files
committed
Remove tests that affirm existence and use of Empty
Now that we've excised the usage of Empty and its presence in github3.py, let's remove all references to it in our testsuite. Related-to sigmavirus24#670
1 parent 245fb6e commit 6109f33

File tree

4 files changed

+0
-14
lines changed

4 files changed

+0
-14
lines changed

tests/integration/test_issue.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ def test_events(self):
146146
issue = repository.issue(218)
147147
for event in issue.events():
148148
assert isinstance(event, github3.issues.event.IssueEvent)
149-
assert event.issue is event.Empty
150149
assert isinstance(event.actor, github3.users.User)
151150

152151
def test_labels(self):

tests/integration/test_repos_repo.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,6 @@ def test_directory_contents(self):
522522
for (filename, content) in contents:
523523
assert content.name == filename
524524
assert isinstance(content, github3.repos.contents.Contents)
525-
assert content.content is content.Empty
526-
assert content.decoded is content.Empty
527525

528526
def test_edit(self):
529527
"""Test the ability to edit a repository."""

tests/unit/test_gists.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,6 @@ class TestGistFile(helper.UnitHelper):
236236
described_class = github3.gists.file.GistFile
237237
example_data = gist_example_short_data()
238238

239-
def test_no_original_content(self):
240-
"""Show that attribute original content is Empty."""
241-
assert self.instance.original_content is self.instance.Empty
242-
243239
def test_get_file_content_from_raw_url(self):
244240
"""Verify the request made to retrieve a GistFile's content."""
245241
self.instance.content()

tests/unit/test_issues_milestone.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,6 @@ def test_none_creator(self):
5353
milestone = github3.issues.milestone.Milestone(json)
5454
assert milestone.creator is None
5555

56-
def test_empty_creator(self):
57-
"""Show that creator is Empty when the json attribute is left out."""
58-
json = self.instance.as_dict().copy()
59-
del json['creator']
60-
milestone = github3.issues.milestone.Milestone(json)
61-
assert milestone.creator is milestone.Empty
62-
6356
def test_due_on(self):
6457
"""Show that due on attribute is a datetime object."""
6558
json = self.instance.as_dict().copy()

0 commit comments

Comments
 (0)
0