[2642] | 1 | import unittest |
---|
| 2 | import doctest |
---|
| 3 | |
---|
[2725] | 4 | import zope.component |
---|
[2642] | 5 | from Testing import ZopeTestCase as ztc |
---|
| 6 | |
---|
[2725] | 7 | from quintagroup.gauth.interfaces import IGAuthUtility |
---|
[2757] | 8 | import quintagroup.gdocs.spreadsheet.content.gspreadsheet as gspreadsheet |
---|
[2642] | 9 | from quintagroup.gdocs.spreadsheet.tests import base |
---|
| 10 | |
---|
[2725] | 11 | |
---|
| 12 | def setUp(test): |
---|
| 13 | |
---|
| 14 | """substitution using the adapter services gdata""" |
---|
| 15 | import quintagroup.gdocs.spreadsheet.tests.adapters |
---|
| 16 | |
---|
| 17 | |
---|
[2757] | 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 | |
---|
[2642] | 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 | |
---|
[2725] | 31 | doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS, |
---|
| 32 | setUp=setUp, |
---|
[2757] | 33 | tearDown=tearDown, |
---|
[2725] | 34 | ), |
---|
[2757] | 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 | |
---|
[2642] | 52 | ]) |
---|
| 53 | |
---|
| 54 | if __name__ == '__main__': |
---|
| 55 | unittest.main(defaultTest='test_suite') |
---|