Skip to content

Instantly share code, notes, and snippets.

@MGough
Created November 17, 2019 22:01
Show Gist options
  • Save MGough/d7cfe4cdffa0c50cd891fabde3178ff8 to your computer and use it in GitHub Desktop.
Save MGough/d7cfe4cdffa0c50cd891fabde3178ff8 to your computer and use it in GitHub Desktop.
An example of an object to test.
from src.imported_class import SomeClassOutOfOurControl
class SomeObjectToTest:
some_property = 5
some_other_property = 10
def __init__(self):
self.calculator = SomeClassOutOfOurControl()
def do_something(self, custom_calculator):
return custom_calculator.add(self.some_property, self.some_other_property)
def do_something_else(self):
return self.calculator.add(self.some_property, self.some_other_property)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment