I\'ve been trying to implement some unit tests for a module. An example module named alphabet.py is as follows:
import database def length_letters(
You don't need to use mock. Just import the module and alter the value of the global within setUp():
setUp()
import alphabet class TestAlphabet(unittest.TestCase): def setUp(self): alphabet.letters = ['a', 'b', 'c']