There was an error while loading. Please reload this page.
1 parent 4ca59e1 commit d4d97fbCopy full SHA for d4d97fb
assignments/fixtures/credentials
@@ -4,6 +4,6 @@ aws_secret_access_key = dxt7e3d3fCSf/NftN8Cys5L4duQ2KPQwN0n+oW
4
5
[profile1]
6
# Comments
7
-aws_access_key_id = testkeyvalue
+aws_access_key_id = testvalue
8
# More comments
9
aws_secret_access_key =testsecretvalue
assignments/test_awscreds.py
@@ -0,0 +1,19 @@
1
+import subprocess
2
+import pexpect
3
+
+import unittest
+def execute(cmd):
+ output, status = pexpect.run(cmd
+ , withexitstatus=1
+ , timeout=600
10
+ )
11
12
+ #print(output)
13
+ return output
14
15
16
+class test_awscreds(unittest.TestCase):
17
18
+def test_awscreds_returns_access_key_given_profile(self):
19
+self.assertIn('testvalue', execute('./awscreds -field key -profile profile1'))
0 commit comments