I'm new to writing python test code and am currently dabbling with unittest.
Why is this complaining:
class MyTestClass(unittest.TestCase):
testdata = "somefile.json"
def testparse(self):
data = json.loads(open(testdata).read())
Traceback (most recent call last):
File "test.py", line 14, in test_instantiation
data = json.loads(open(testdata).read())
NameError: global name 'testdata' is not defined