Skip to content

Instantly share code, notes, and snippets.

What would you like to do?


from unittest import TestCase
from unittest.mock import patch, Mock
from foo import FooModule

class DemoTest(TestCase):
    def setUpClass(cls):

    def test_craft_message(self):
        c = FooModule(0)

    def tearDownClass(cls):


from .client import Client

class FooModule:
    v = -1

    def __init__(self, n):
        self.v = n
        self.client = Client(self) 
    def ping(self):


class Client:
    def __init__(self, foo_module): = foo_module
    def ping(self, n):
        return n /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.