'Verify we can get assertions via the course_id and username.'

def test_get_assertions(self):

    course_key = self.course.location.course_key
    badge_class = BadgeClassFactory.create(course_id=course_key)
    for dummy in range(3):
        BadgeAssertionFactory.create(user=self.user, badge_class=badge_class)
    for dummy in range(3):
        BadgeAssertionFactory.create(user=self.user)
    for dummy in range(6):
        BadgeAssertionFactory.create(badge_class=badge_class)
    response = self.get_json(self.url(), data={'course_id': course_key})
    self.assertEqual(len(response['results']), 3)
    unused_course = CourseFactory.create()
    response = self.get_json(self.url(), data={'course_id': unused_course.location.course_key})
    self.assertEqual(len(response['results']), 0)
