This happens because there is no global context set when running the draw tests. Removing the global access fixes the issue.