c805468449
Refactor ankiserverctl.py to delegate database operations to SqliteUserManager and use python3 compatible print calls.
Christoph Mack
2016-05-27 21:42:52 +02:00
c7d7ff3e85
Merge SyncApp's SqliteUserManager and the newly introduced UserManager and group all user managers in user_managers.py.
Christoph Mack
2016-05-27 21:33:22 +02:00
573aeece81
Add more test helpers and integration tests for SyncApp's media sync feature using WebTest's TestApp. Add test helpers for creating, inspecting and manipulating instances of SyncApp and RestApp. Add subclasses of Anki's RemoteServer and RemoteMediaServer for communicating with the wrapped SyncApp instance under test. Add helpers for monkey patching Anki's MediaManager and DB for easier testing. Add test assets directory.
Christoph Mack
2016-02-29 09:56:28 +01:00
cb574aa0a7
Add test helper classes for creating and managing temporary files, working with anki collections and sqlite dbs. Add class for managing users so users can be added programmatically without using ankiserverctl.
Christoph Mack
2016-02-05 22:40:39 +01:00
28e950c138
Added unit tests for SimpleUserManager, SqliteUserManagerTest, SimpleSessionManager and SqliteSessionManagerTest.
Christoph Mack
2015-10-05 19:41:00 +02:00
6e881bfb85
Added unit test for SyncCollectionHandler. Moved CollectionTestBase to a separate file.
Christoph Mack
2015-10-05 19:21:38 +02:00
99adc658d5
Remove support for legacy modules
flan
2017-10-28 20:43:09 +02:00
2cb5871ba3
Safer handling of uploaded database files during full sync. Before overwriting its version of a user's collection database file with one uploaded by the client, the server now performs a basic integrity check using SQLite's 'pragma integrity_check'.
Christoph Mack
2015-10-08 21:41:04 +02:00
f3788fc2c8
fix syntax error causing failure in error handler in SyncMediaHandler._remove_media_files()
Christoph Mack
2016-08-02 19:34:17 +02:00
67830218eb
Drop support for Anki <2.0.27
flan
2017-03-05 00:39:06 +01:00
b0cb424770
Use os.path.join() for path concatenation
flan
2017-10-28 19:02:07 +02:00
ceb931519d
Bring back authentication
flan
2017-10-28 18:37:37 +02:00
e32bceccf3
Not only add, but also remove files when adopting changes to client media files in SyncMediaHandler.uploadChanges(). Count added and removed files as processed and increment media usn accodingly. Refactor SyncMediaHandler.uploadChanges().
Christoph Mack
2016-01-24 13:21:00 +01:00
87ee726d25
Define skey once when creating user session, not each time when beginning media sync.
Christoph Mack
2016-01-22 23:27:32 +01:00
1b1a3d8e22
Define a random skey to return to the client when media syncing begins, so we don't send a null skey value.
Christoph Mack
2016-01-22 08:34:10 +01:00
f03aea67c1
SyncMediaHandler.begin(): return media database usn instead of collection database usn. If the wrong usn is returned, media syncing on the client will not finish with status "noChanges" even if there have been no changes since the last media sync.
Christoph Mack
2016-01-19 11:20:37 +01:00
3baad9cfac
Fix syncing with AnkiDroid
jdoe0
2015-11-29 11:53:58 +07:00
d3eab4266e
Update addon code in README.md
jdoe0
2015-11-27 12:27:07 +07:00