Added test for email body containing course url and some pep8 fixes.