project-wide changed test assertion style to pytest
cleaned constant names
fixed DictAccessWrapper to use copy of dict
changed test helper function to allow undefined json keys; simplier too
cleaned scratch module variables and fixed uses of constants