diff --git a/stripe/api_resources/abstract/__init__.py b/stripe/api_resources/abstract/__init__.py index 047694ae1..7f333cf28 100644 --- a/stripe/api_resources/abstract/__init__.py +++ b/stripe/api_resources/abstract/__init__.py @@ -27,7 +27,6 @@ from stripe.api_resources.abstract.custom_method import custom_method from stripe.api_resources.abstract.test_helpers import ( - test_helpers, APIResourceTestHelpers, ) diff --git a/stripe/api_resources/abstract/test_helpers.py b/stripe/api_resources/abstract/test_helpers.py index 2a1ac4831..056a4154f 100644 --- a/stripe/api_resources/abstract/test_helpers.py +++ b/stripe/api_resources/abstract/test_helpers.py @@ -2,7 +2,6 @@ from stripe import error, util from urllib.parse import quote_plus -from stripe.api_resources.abstract import APIResource class APIResourceTestHelpers: @@ -54,27 +53,3 @@ def instance_url(self): base = self.class_url() extn = quote_plus(id) return "%s/%s" % (base, extn) - - -# TODO (next major) -def test_helpers(cls): - """ - The test_helpers decorator is deprecated and will be removed in a future version - of the library. - """ - - def test_helpers_getter(self): - return self.TestHelpers(self) - - if not issubclass(cls, APIResource): - raise ValueError( - "Could not apply @test_helpers decorator to %r." - " The class should a subclass of APIResource." % cls - ) - - cls.TestHelpers._resource_cls = cls - cls.TestHelpers._static_request = cls._static_request - cls.TestHelpers._static_request_stream = cls._static_request_stream - - cls.test_helpers = property(test_helpers_getter) - return cls