diff options
Diffstat (limited to 'python/tests')
| -rw-r--r-- | python/tests/codegen_tests/test_changelog_entry.py | 40 | ||||
| -rw-r--r-- | python/tests/codegen_tests/test_default_api.py | 42 | ||||
| -rw-r--r-- | python/tests/codegen_tests/test_entity_history_entry.py | 40 | ||||
| -rw-r--r-- | python/tests/routes.py | 30 | 
4 files changed, 149 insertions, 3 deletions
| diff --git a/python/tests/codegen_tests/test_changelog_entry.py b/python/tests/codegen_tests/test_changelog_entry.py new file mode 100644 index 00000000..a8401891 --- /dev/null +++ b/python/tests/codegen_tests/test_changelog_entry.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" +    fatcat + +    A scalable, versioned, API-oriented catalog of bibliographic entities and file metadata  # noqa: E501 + +    OpenAPI spec version: 0.1.0 +     +    Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import fatcat_client +from fatcat_client.models.changelog_entry import ChangelogEntry  # noqa: E501 +from fatcat_client.rest import ApiException + + +class TestChangelogEntry(unittest.TestCase): +    """ChangelogEntry unit test stubs""" + +    def setUp(self): +        pass + +    def tearDown(self): +        pass + +    def testChangelogEntry(self): +        """Test ChangelogEntry""" +        # FIXME: construct object with mandatory attributes with example values +        # model = fatcat_client.models.changelog_entry.ChangelogEntry()  # noqa: E501 +        pass + + +if __name__ == '__main__': +    unittest.main() diff --git a/python/tests/codegen_tests/test_default_api.py b/python/tests/codegen_tests/test_default_api.py index a1f22d8c..e3008898 100644 --- a/python/tests/codegen_tests/test_default_api.py +++ b/python/tests/codegen_tests/test_default_api.py @@ -101,18 +101,42 @@ class TestDefaultApi(unittest.TestCase):          """          pass +    def test_get_changelog(self): +        """Test case for get_changelog + +        """ +        pass + +    def test_get_changelog_entry(self): +        """Test case for get_changelog_entry + +        """ +        pass +      def test_get_container(self):          """Test case for get_container          """          pass +    def test_get_container_history(self): +        """Test case for get_container_history + +        """ +        pass +      def test_get_creator(self):          """Test case for get_creator          """          pass +    def test_get_creator_history(self): +        """Test case for get_creator_history + +        """ +        pass +      def test_get_creator_releases(self):          """Test case for get_creator_releases @@ -143,6 +167,12 @@ class TestDefaultApi(unittest.TestCase):          """          pass +    def test_get_file_history(self): +        """Test case for get_file_history + +        """ +        pass +      def test_get_release(self):          """Test case for get_release @@ -155,6 +185,12 @@ class TestDefaultApi(unittest.TestCase):          """          pass +    def test_get_release_history(self): +        """Test case for get_release_history + +        """ +        pass +      def test_get_stats(self):          """Test case for get_stats @@ -167,6 +203,12 @@ class TestDefaultApi(unittest.TestCase):          """          pass +    def test_get_work_history(self): +        """Test case for get_work_history + +        """ +        pass +      def test_get_work_releases(self):          """Test case for get_work_releases diff --git a/python/tests/codegen_tests/test_entity_history_entry.py b/python/tests/codegen_tests/test_entity_history_entry.py new file mode 100644 index 00000000..4c27c80f --- /dev/null +++ b/python/tests/codegen_tests/test_entity_history_entry.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" +    fatcat + +    A scalable, versioned, API-oriented catalog of bibliographic entities and file metadata  # noqa: E501 + +    OpenAPI spec version: 0.1.0 +     +    Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import fatcat_client +from fatcat_client.models.entity_history_entry import EntityHistoryEntry  # noqa: E501 +from fatcat_client.rest import ApiException + + +class TestEntityHistoryEntry(unittest.TestCase): +    """EntityHistoryEntry unit test stubs""" + +    def setUp(self): +        pass + +    def tearDown(self): +        pass + +    def testEntityHistoryEntry(self): +        """Test EntityHistoryEntry""" +        # FIXME: construct object with mandatory attributes with example values +        # model = fatcat_client.models.entity_history_entry.EntityHistoryEntry()  # noqa: E501 +        pass + + +if __name__ == '__main__': +    unittest.main() diff --git a/python/tests/routes.py b/python/tests/routes.py index ec4eaf12..5a523efa 100644 --- a/python/tests/routes.py +++ b/python/tests/routes.py @@ -27,6 +27,12 @@ def test_all_views(app):      rv = app.get('/container/00000000-0000-0000-1111-000000000002')      assert rv.status_code == 200 +    rv = app.get('/container/00000000-0000-0000-1111-000000000002/history') +    assert rv.status_code == 200 + +    rv = app.get('/container/00000000-0000-0000-1111-000000000002/edit') +    assert rv.status_code == 200 +      rv = app.get('/container/create')      assert rv.status_code == 200 @@ -42,6 +48,12 @@ def test_all_views(app):      rv = app.get('/creator/00000000-0000-0000-2222-000000000002')      assert rv.status_code == 200 +    rv = app.get('/creator/00000000-0000-0000-2222-000000000002/history') +    assert rv.status_code == 200 + +    rv = app.get('/creator/00000000-0000-0000-2222-000000000002/edit') +    assert rv.status_code == 200 +      rv = app.get('/creator/lookup?orcid=0000-0003-2088-7465')      assert rv.status_code == 302 @@ -54,6 +66,15 @@ def test_all_views(app):      rv = app.get('/release/00000000-0000-0000-4444-000000000002')      assert rv.status_code == 200 +    rv = app.get('/release/00000000-0000-0000-4444-000000000002/history') +    assert rv.status_code == 200 + +    rv = app.get('/release/00000000-0000-0000-4444-000000000002/edit') +    assert rv.status_code == 200 + +    rv = app.get('/release/create') +    assert rv.status_code == 200 +      rv = app.get('/release/lookup?doi=10.123/abc')      assert rv.status_code == 302 @@ -66,11 +87,14 @@ def test_all_views(app):      rv = app.get('/work/00000000-0000-0000-5555-000000000002')      assert rv.status_code == 200 -    rv = app.get('/work/create') +    rv = app.get('/work/00000000-0000-0000-5555-000000000002/history')      assert rv.status_code == 200 -    #rv = app.get('/release/00000000-0000-0000-4444-000000000002/changelog') -    #assert rv.status_code == 200 +    rv = app.get('/work/00000000-0000-0000-5555-000000000002/edit') +    assert rv.status_code == 200 + +    rv = app.get('/work/create') +    assert rv.status_code == 404      rv = app.get('/editgroup/1')      assert rv.status_code == 200 | 
