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 == ''
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=='
def test_get_no_secret_empty_file(self): result = mons.get_secret(self.data) assert result == ''