'Tests the result if correct data is received.'

@patch('edxnotes.helpers.requests.get', autospec=True)
def test_get_notes_correct_data(self, mock_get):

    mock_get.return_value.content = json.dumps({'total': 2, 'current_page': 1, 'start': 0, 'next': None, 'previous': None, 'num_pages': 1, 'rows': [{u'quote': u'quote    text', u'text': u'text', u'usage_id': unicode(self.html_module_1.location), u'updated': datetime(2014, 11, 19, 8, 5, 16, 0).isoformat()}, {u'quote': u'quote    text', u'text': u'text', u'usage_id': unicode(self.html_module_2.location), u'updated': datetime(2014, 11, 19, 8, 6, 16, 0).isoformat()}]})
    self.assertItemsEqual({'count': 2, 'current_page': 1, 'start': 0, 'next': None, 'previous': None, 'num_pages': 1, 'results': [{u'quote': u'quote    text', u'text': u'text', u'chapter': {u'display_name': self.chapter.display_name_with_default_escaped, u'index': 0, u'location': unicode(self.chapter.location), u'children': [unicode(self.sequential.location)]}, u'section': {u'display_name': self.sequential.display_name_with_default_escaped, u'location': unicode(self.sequential.location), u'children': [unicode(self.vertical.location), unicode(self.vertical_with_container.location)]}, u'unit': {u'url': self._get_unit_url(self.course, self.chapter, self.sequential), u'display_name': self.vertical.display_name_with_default_escaped, u'location': unicode(self.vertical.location)}, u'usage_id': unicode(self.html_module_2.location), u'updated': 'Nov    19,    2014    at    08:06    UTC'}, {u'quote': u'quote    text', u'text': u'text', u'chapter': {u'display_name': self.chapter.display_name_with_default_escaped, u'index': 0, u'location': unicode(self.chapter.location), u'children': [unicode(self.sequential.location)]}, u'section': {u'display_name': self.sequential.display_name_with_default_escaped, u'location': unicode(self.sequential.location), u'children': [unicode(self.vertical.location), unicode(self.vertical_with_container.location)]}, u'unit': {u'url': self._get_unit_url(self.course, self.chapter, self.sequential), u'display_name': self.vertical.display_name_with_default_escaped, u'location': unicode(self.vertical.location)}, u'usage_id': unicode(self.html_module_1.location), u'updated': 'Nov    19,    2014    at    08:05    UTC'}]}, helpers.get_notes(self.request, self.course))
