-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a helper to retrieve the AWS account ID associated with a given a…
…ccess key ID (#920) * Adapt the AWS Key ID decoding blog post to a helper * Appease the linter * Appease the linter again * Move to panther_default; set up default_test.py * We don't need the separate Makefile target
- Loading branch information
Evan Gibler
authored
Oct 30, 2023
1 parent
d0529d4
commit 596cbc1
Showing
2 changed files
with
37 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env python | ||
# Unit tests for functions inside panther_default | ||
|
||
import os | ||
import sys | ||
import unittest | ||
|
||
sys.path.append(os.path.dirname(__file__)) | ||
import panther_default as p_d # pylint: disable=C0413 | ||
|
||
|
||
class TestAWSKeyAccountID(unittest.TestCase): | ||
def test_aws_key_account_id(self): | ||
aws_key_id = "ASIAY34FZKBOKMUTVV7A" | ||
account_id = p_d.aws_key_account_id(aws_key_id) | ||
self.assertEqual(account_id, "609629065308") |
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