'Test word cloud data flow per single and collective users submits.
Make sures that:
1. Inital state of word cloud is correct. Those state that
is sended from server to frontend, when students load word
cloud page.
2. Students can submit data succesfully.
3. Next submits produce "already voted" error. Next submits for user
are not allowed by user interface, but techically it possible, and
word_cloud should properly react.
4. State of word cloud after #3 is still as after #2.'

def test_collective_users_submits(self):

    users_state = self._get_users_state()
    self.assertEqual(''.join(set([content['status'] for (_, content) in users_state.items()])), 'success')
    users_state_after_post = self._post_words(['word1', 'word2'])
    self.assertEqual(''.join(set([content['status'] for (_, content) in users_state_after_post.items()])), 'success')
    users_state_before_fail = self._get_users_state()
    users_state_after_post = self._post_words(['word1', 'word2', 'word3'])
    self.assertEqual(''.join(set([content['status'] for (_, content) in users_state_after_post.items()])), 'fail')
    current_users_state = self._get_users_state()
    self._check_response(users_state_before_fail, current_users_state)
