def test_authentication_headers_GitHub_Actions_without_PR_head(self): header = authentication_headers() self.assertEqual(len(header), 7) self.assertEqual(header["GitHub-Actions"], "true") self.assertEqual(header["GitHub-Run-Id"], "1") self.assertEqual(header["GitHub-Repository"], "launchableinc/test") self.assertEqual(header["GitHub-Workflow"], "build") self.assertEqual(header["GitHub-Run-Number"], "1") self.assertEqual(header["GitHub-Event-Name"], "push") self.assertEqual(header["GitHub-Sha"], "test")
def test_authentication_headers_LAUNCHABLE_TOKEN_and_GitHub_Actions(self): header = authentication_headers() self.assertEqual(len(header), 1) self.assertEqual(header["Authorization"], "Bearer v1:launchableinc/test:token")
def test_authentication_headers_empty(self): header = authentication_headers() self.assertEqual(len(header), 0)