1 | import unittest |
---|
2 | import doctest |
---|
3 | |
---|
4 | import zope.component |
---|
5 | from Testing import ZopeTestCase as ztc |
---|
6 | |
---|
7 | from quintagroup.gauth.interfaces import IGAuthUtility |
---|
8 | import quintagroup.gdocs.spreadsheet.content.gspreadsheet as gspreadsheet |
---|
9 | from quintagroup.gdocs.spreadsheet.tests import base |
---|
10 | |
---|
11 | |
---|
12 | def setUp(test): |
---|
13 | |
---|
14 | """substitution using the adapter services gdata""" |
---|
15 | import quintagroup.gdocs.spreadsheet.tests.adapters |
---|
16 | |
---|
17 | |
---|
18 | def tearDown(test): |
---|
19 | """This is the companion to setUp - it can be used to clean up the |
---|
20 | test environment after each test. |
---|
21 | """ |
---|
22 | |
---|
23 | def test_suite(): |
---|
24 | return unittest.TestSuite([ |
---|
25 | |
---|
26 | # Demonstrate the main content types |
---|
27 | ztc.ZopeDocFileSuite( |
---|
28 | 'README.txt', package='quintagroup.gdocs.spreadsheet', |
---|
29 | test_class=base.FunctionalTestCase, |
---|
30 | optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | |
---|
31 | doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS, |
---|
32 | setUp=setUp, |
---|
33 | tearDown=tearDown, |
---|
34 | ), |
---|
35 | ztc.ZopeDocFileSuite('tests/test_adapters.txt', |
---|
36 | package='quintagroup.gdocs.spreadsheet', |
---|
37 | test_class=base.FunctionalTestCase, |
---|
38 | optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | |
---|
39 | doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS, |
---|
40 | setUp=setUp, |
---|
41 | tearDown=tearDown, |
---|
42 | ), |
---|
43 | ztc.ZopeDocFileSuite('tests/test_context.txt', |
---|
44 | package='quintagroup.gdocs.spreadsheet', |
---|
45 | test_class=base.FunctionalTestCase, |
---|
46 | optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | |
---|
47 | doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS, |
---|
48 | setUp=setUp, |
---|
49 | tearDown=tearDown, |
---|
50 | ), |
---|
51 | |
---|
52 | ]) |
---|
53 | |
---|
54 | if __name__ == '__main__': |
---|
55 | unittest.main(defaultTest='test_suite') |
---|