| 120 | ) |
| 121 | |
| 122 | def testEditWithAllParameters(self): |
| 123 | gist = self.g.get_gist("2729810") |
| 124 | gist.edit( |
| 125 | "Description edited by PyGithub", |
| 126 | {"barbaz.txt": github.InputFileContent("File also created by PyGithub")}, |
| 127 | ) |
| 128 | self.assertEqual(gist.description, "Description edited by PyGithub") |
| 129 | self.assertEqual( |
| 130 | gist.updated_at, |
| 131 | datetime(2012, 5, 19, 7, 6, 10, tzinfo=timezone.utc), |
| 132 | ) |
| 133 | self.assertEqual(set(gist.files.keys()), {"foobar.txt", "barbaz.txt"}) |
| 134 | |
| 135 | def testDeleteFile(self): |
| 136 | gist = self.g.get_gist("5339374") |