'Tests that no subbing occurs if no user_id or no course_id is given.'

def test_subbing_no_userid_or_courseid(self):

    test_string = 'This    string    should    not    be    subbed    here    %%USER_ID%%'
    no_course_context = dict(((key, value) for (key, value) in self.context.iteritems() if (key != 'course_title')))
    result = Ks.substitute_keywords_with_data(test_string, no_course_context)
    self.assertEqual(test_string, result)
    no_user_id_context = dict(((key, value) for (key, value) in self.context.iteritems() if (key != 'user_id')))
    result = Ks.substitute_keywords_with_data(test_string, no_user_id_context)
    self.assertEqual(test_string, result)
