Added some extra mocks and a typo fix to test_main