Revert "Get required fixture even from owner object type"
This reverts commit b77b89a914
.
Reason for revert: This is causing fixtures to be created during test case collection phase
Change-Id: I1f8c04d9f6f4683c36643d78140e6d7cf32a6f75
This commit is contained in:
parent
b77b89a914
commit
94e57cc8ad
@ -484,7 +484,10 @@ class RequiredFixtureProperty(object):
|
||||
self.setup = setup
|
||||
|
||||
def __get__(self, instance, _):
|
||||
return self.get_fixture(instance)
|
||||
if instance is None:
|
||||
return self
|
||||
else:
|
||||
return self.get_fixture(instance)
|
||||
|
||||
def get_fixture(self, _instance):
|
||||
fixture = get_fixture(self.fixture, **self.fixture_params)
|
||||
|
@ -388,12 +388,6 @@ class RequiredFixtureTest(unit.TobikoUnitTest):
|
||||
fixture.setup_fixture.assert_not_called()
|
||||
fixture.cleanup_fixture.assert_not_called()
|
||||
|
||||
def test_required_fixture_with_type(self):
|
||||
fixture = type(self).required_fixture
|
||||
self.assertIsInstance(fixture, MyRequiredFixture)
|
||||
fixture.setup_fixture.assert_called()
|
||||
fixture.cleanup_fixture.assert_not_called()
|
||||
|
||||
|
||||
class SharedFixtureTest(unit.TobikoUnitTest):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user