(self)
| 266 | ) |
| 267 | |
| 268 | def testHostnameHasDomain(self): |
| 269 | assert self.g.requester.__hostnameHasDomain("github.com", "github.com") |
| 270 | assert self.g.requester.__hostnameHasDomain("api.github.com", "github.com") |
| 271 | assert self.g.requester.__hostnameHasDomain("api.github.com", "github.com") |
| 272 | assert self.g.requester.__hostnameHasDomain("ghe.local", "ghe.local") |
| 273 | assert self.g.requester.__hostnameHasDomain("api.ghe.local", "ghe.local") |
| 274 | assert self.g.requester.__hostnameHasDomain("api.prod.ghe.local", "prod.ghe.local") |
| 275 | assert self.g.requester.__hostnameHasDomain("github.com", ["github.com", "githubusercontent.com"]) |
| 276 | assert self.g.requester.__hostnameHasDomain("api.github.com", ["github.com", "githubusercontent.com"]) |
| 277 | assert self.g.requester.__hostnameHasDomain("githubusercontent.com", ["github.com", "githubusercontent.com"]) |
| 278 | assert self.g.requester.__hostnameHasDomain( |
| 279 | "objects.githubusercontent.com", ["github.com", "githubusercontent.com"] |
| 280 | ) |
| 281 | assert self.g.requester.__hostnameHasDomain("maliciousgithub.com", "github.com") is False |
| 282 | assert self.g.requester.__hostnameHasDomain("abc.def", ["github.com", "githubusercontent.com"]) is False |
| 283 | |
| 284 | def testAssertUrlAllowed(self): |
| 285 | # default github.com requester |
nothing calls this directly
no test coverage detected