def test_createBlankSheet(self): testName = "testing_created_blank_sheet" createdSheetId = drive.createBlankSheet(testName, []) contents = drive.list() createdSheet = {'id': createdSheetId, 'name': testName} assert contents == [createdSheet]
def test_createBlank(self): testName = "testing_created_blank" createdSheetId = drive.createBlank(testName, [], drive.MimeTypes.sheet) contents = drive.list() createdSheet = {'id': createdSheetId, 'name': testName} assert contents == [createdSheet]
def test_create(self): testName = 'testing_create_sheet' testData = [[]] createdSheetId = spreadsheets.create(testData, testName) contents = drive.list() createdSheet = {'id': createdSheetId, 'name': testName} assert contents == [createdSheet]
def test_list_filtered(self): testName1 = "testing_created_1" createdSheetId1 = drive.createBlank( testName1, [], drive.MimeTypes.sheet) testName2 = "testing_created_2" createdSheetId2 = drive.createBlank( testName2, [], drive.MimeTypes.sheet) testName3 = "testing_created_3" createdSheetId3 = drive.createBlank( testName3, [], drive.MimeTypes.sheet) matchedContents = drive.list("name = 'testing_created_2'") assert matchedContents == [ {'id': createdSheetId2, 'name': testName2} ]
def cleanDrive(): allContents = drive.list() for item in allContents: drive.delete(item['id'])
def test_list_empty(self): contents = drive.list() assert contents == []