'Verify that the award command calls the award function on the backend with the right parameters.'

@override_settings(BADGING_BACKEND='lms.djangoapps.badges.backends.badgr.BadgrBackend', BADGR_API_TOKEN='test')
@patch('lms.djangoapps.badges.backends.badgr.BadgrBackend.award')
def test_award(self, mock_award):

    user = UserFactory.create()
    badge_class = BadgeClassFactory.create()
    badge_class.award(user, evidence_url='http://example.com/evidence')
    self.assertTrue(mock_award.called)
    mock_award.assert_called_with(badge_class, user, evidence_url='http://example.com/evidence')
