def get_list(self, request, **kwargs): user_profile = UserProfile.objects.get(user = request.user) if user_profile.is_evernote_synced: project = Project.objects.get(pk = self.instance.pk) Note.get_synced_notes(user_profile, project) self.instance.notes = project.notes return super(NoteCollectionResource, self).get_list(request, **kwargs)
def test_get_synced_notes(self): Note.get_synced_notes(self.user_profile.evernote_profile) self.assertTrue(False)