Merge lp://qastaging/~jamesh/unity-scope-gdrive/previews into lp://qastaging/~submarine/unity-scope-gdrive/libunity-7-compatible

Proposed by James Henstridge
Status: Merged
Approved by: Michal Hruby
Approved revision: 52
Merged at revision: 47
Proposed branch: lp://qastaging/~jamesh/unity-scope-gdrive/previews
Merge into: lp://qastaging/~submarine/unity-scope-gdrive/libunity-7-compatible
Diff against target: 534 lines (+290/-86)
6 files modified
debian/control (+7/-0)
debian/rules (+3/-0)
gdrive.scope (+1/-1)
test_scope.py (+142/-0)
unity-scope-gdrive.service (+1/-1)
unity_gdrive_daemon.py (+136/-84)
To merge this branch: bzr merge lp://qastaging/~jamesh/unity-scope-gdrive/previews
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+162505@code.qastaging.launchpad.net

Commit message

Convert to the new scope API and add a preview.

Description of the change

Convert scope to new API, and add a simple preview showing author, modification date and whether the document has been starred or shared.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

Could we get some tests? Or is that too complex with the authentication?

review: Needs Information
50. By James Henstridge

Use InfoHint to construct the preview.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
51. By James Henstridge

Add a test for the search functionality. Unfortunately we need to use a
stub document since GData.Parsable.new_from_xml() segfaults for
GData.Feed subtypes.

The preview test is also skipped because I can't initialise the metadata
dictionary.

52. By James Henstridge

Enable tests in packaging.

Revision history for this message
James Henstridge (jamesh) wrote :

I've added some basic tests for the search functionality, although it stubs out all the account discovery code and provides a fake DocumentsEntry class.

My original plan was to use GData.Parsable.new_from_xml() to build the feed from some sample XML, but that segfaults the interpreter. A quick poke with GDB shows that this wouldn't work from C either: it looks like you can only decode into GData.Feed subclasses from the query code path.

The previewer test is also disabled because I wasn't able to initialise Unity.ScopeResult.metadata from Python in a way that wouldn't cause it to segfault.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: