Exemple #1
0
 def test_get_no_secret_wrong_file(self):
     contents = """
     [mon.]
            caps mon = "allow *"
     """
     self.set_contents(contents)
     result = mons.get_secret(self.data)
     assert result == ''
Exemple #2
0
 def test_get_secret(self):
     contents = """
     [mon.]
            key = AQBvaBFZAAAAABAA9VHgwCg3rWn8fMaX8KL01A==
            caps mon = "allow *"
     """
     self.set_contents(contents)
     result = mons.get_secret(self.data)
     assert result == 'AQBvaBFZAAAAABAA9VHgwCg3rWn8fMaX8KL01A=='
Exemple #3
0
 def test_get_no_secret_empty_file(self):
     result = mons.get_secret(self.data)
     assert result == ''