8000 Revert cf1c318cb8c49d8ad4d4cb9efc32f7cc2150f69f. · pljensen/github3.py@837261e · GitHub
[go: up one dir, main page]

Skip to content

Commit 837261e

Browse files
committed
Revert cf1c318.
Revert "Removed dead code from create_instance_of_described_class and backported modifications in child class TestGitHubEnterprise"
1 parent cf1c318 commit 837261e

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tests/unit/helper.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,12 @@ def create_instance_of_described_class(self):
7979
If cls.example_data is None, just create a simple instance of the
8080
class.
8181
"""
82-
instance = self.described_class(self.example_data)
83-
instance.session = self.session
82+
if self.example_data:
83+
instance = self.described_class(self.example_data,
84+
self.session)
85+
else:
86+
instance = self.described_class()
87+
instance.session = self.session
8488

8589
return instance
8690

tests/unit/test_github_enterprise.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ class TestGitHubEnterprise(UnitHelper):
1919
described_class = GitHubEnterprise
2020
example_data = base_url
2121

22+
def create_instance_of_described_class(self):
23+
instance = self.described_class(self.example_data)
24+
instance.session = self.session
25+
26+
return instance
27+
2228
def after_setup(self):
2329
self.described_class._build_url = _build_url
2430

0 commit comments

Comments
 (0)
0