예제 #1
0
파일: tests.py 프로젝트: Markinhos/Drawer
 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)
예제 #2
0
 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)
예제 #3
0
파일: tests.py 프로젝트: Markinhos/Drawer
 def test_get_synced_notes(self):
     Note.get_synced_notes(self.user_profile.evernote_profile)
     self.assertTrue(False)