-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Elyse Weiss
authored and
Elyse Weiss
committed
May 29, 2024
1 parent
c93dbb7
commit 68c3685
Showing
3 changed files
with
40 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import unittest | ||
import os | ||
from parsons import GoogleDrive | ||
import random | ||
import string | ||
|
||
# Test Slides: https://docs.google.com/presentation/d/19I-kicyaJV53KoPNwt77KJL10fHzWFdZ_c2mW4XJaxc | ||
|
||
|
@@ -22,7 +24,10 @@ def test_get_permissions(self): | |
def test_share_object(self): | ||
|
||
file_id = "19I-kicyaJV53KoPNwt77KJL10fHzWFdZ_c2mW4XJaxc" | ||
email_addresses = ["[email protected]"] | ||
email = ''.join(random.choices(string.ascii_letters, k=10))+"@gmail.com" | ||
email_addresses = [email] | ||
|
||
shared = self.gd.share_object(file_id, email_addresses) | ||
self.assertTrue(True, list(set([x in p["permissions"] for x in shared]))[0]) | ||
before = self.gd.get_permissions(file_id)['permissions'] | ||
self.gd.share_object(file_id, email_addresses) | ||
after = self.gd.get_permissions(file_id)['permissions'] | ||
self.assertTrue(True, len(after) > len(before)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters