def test_sync_evernote(self): note = Note(title = 'test note sync', content = 'test content sync') self.project.notes.append(note) self.project.save() createdNote = note.sync_note_evernote(self.user_profile.evernote_profile) self.assertTrue(createdNote is not None) self.assertTrue(createdNote.active)
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)