Allow author to cap enrollments in course

add a test case for enrollment caps

pep8 fix