Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""Copyright 2022 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import unittest

import fetch_appdata_folder


class TestFetchAppdataFolder(unittest.TestCase):
"""Unit test class for Appdata snippet"""

@classmethod
def test_list_appdata(cls):
"""Test list_appdata"""
file_id = fetch_appdata_folder.fetch_appdata_folder()
cls.assertIsNotNone(cls, file_id)


if __name__ == '__main__':
unittest.main()
31 changes: 31 additions & 0 deletions drive/snippets/drive-v3/app_data_snippet/test_list_appdata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""Copyright 2022 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import unittest

import list_appdata


class TestListAppdata(unittest.TestCase):
"""Unit test class for Appdata snippet"""

@classmethod
def test_list_appdata(cls):
"""Test list_appdata"""
files = list_appdata.list_appdata()
cls.assertNotEqual(cls, 0, len(files))


if __name__ == '__main__':
unittest.main()
35 changes: 35 additions & 0 deletions drive/snippets/drive-v3/app_data_snippet/test_upload_appdata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""Copyright 2022 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import unittest

import upload_app_data


class TestUploadAppdata(unittest.TestCase):
"""
Unit test class for Appdata snippet
"""

@classmethod
def test_upload_adddata(cls):
"""Test upload_appdata
create a text file titled "abc.txt" in order to pass this test
"""
file_id = upload_app_data.upload_appdata()
cls.assertIsNotNone(cls, file_id)


if __name__ == '__main__':
unittest.main()