diff options
author | drebs <drebs@leap.se> | 2013-01-03 17:23:42 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-01-03 17:23:42 -0200 |
commit | b3e8449b0e920a725036bc611ff28f83b9c1a55c (patch) | |
tree | c7dd4e4d4fc9059b1ebddb8449e421b21cbcc640 /src/leap/soledad/tests/test_leap_backend.py | |
parent | 1b1044b2b6812f04c7d60d177e23d422035451b0 (diff) |
LeapDocument passes Document tests.
Diffstat (limited to 'src/leap/soledad/tests/test_leap_backend.py')
-rw-r--r-- | src/leap/soledad/tests/test_leap_backend.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/leap/soledad/tests/test_leap_backend.py b/src/leap/soledad/tests/test_leap_backend.py index 70cd8710..9a8daf1a 100644 --- a/src/leap/soledad/tests/test_leap_backend.py +++ b/src/leap/soledad/tests/test_leap_backend.py @@ -6,6 +6,7 @@ from u1db import ( ) from leap.soledad.backends import leap_backend as http_database +from leap.soledad.backends.leap_backend import LeapDocument from leap.soledad.tests import u1db_tests as tests from leap.soledad.tests.u1db_tests.test_http_database import ( @@ -14,6 +15,10 @@ from leap.soledad.tests.u1db_tests.test_http_database import ( TestHTTPDatabaseIntegration, ) from leap.soledad.tests.u1db_tests.test_http_client import TestHTTPClientBase +from leap.soledad.tests.u1db_tests.test_document import ( + TestDocument, + TestPyDocument, +) class TestLeapDatabaseSimpleOperations(TestHTTPDatabaseSimpleOperations): @@ -111,3 +116,20 @@ class TestLeapDatabaseIntegration(TestHTTPDatabaseIntegration): class TestLeapClientBase(TestHTTPClientBase): pass + + +def make_document_for_test(test, doc_id, rev, content, has_conflicts=False): + return LeapDocument(doc_id, rev, content, has_conflicts=has_conflicts) + + +class TestLeapDocument(TestDocument): + + scenarios = ([( + 'py', {'make_document_for_test': make_document_for_test})]) + + +class TestLeapPyDocument(TestPyDocument): + + scenarios = ([( + 'py', {'make_document_for_test': make_document_for_test})]) + |