'Students can submit data succesfully.
Word cloud data properly updates after students submit.'

def test_post_words(self):

    input_words = ['small', 'BIG', '    Spaced    ', '    few    words']
    correct_words = [u'small', u'big', u'spaced', u'few    words']
    users_state = self._post_words(input_words)
    self.assertEqual(''.join(set([content['status'] for (_, content) in users_state.items()])), 'success')
    correct_state = {}
    for (index, user) in enumerate(self.users):
        correct_state[user.username] = {u'status': u'success', u'submitted': True, u'display_student_percents': True, u'student_words': {word: (1 + index) for word in correct_words}, u'total_count': (len(input_words) * (1 + index)), u'top_words': [{u'text': word, u'percent': (100 / len(input_words)), u'size': (1 + index)} for word in correct_words]}
    self._check_response(users_state, correct_state)
