-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add tests + delimiter global + removal of pycache from gitignore
- Loading branch information
1 parent
bc8eae6
commit fb6867c
Showing
3 changed files
with
23 additions
and
4 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 |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
tmp* | ||
auto-doc* | ||
./test* | ||
**/__pycache__/ |
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
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,17 @@ | ||
import unittest | ||
|
||
from main import parse_secret | ||
|
||
class TestParseSecret(unittest.TestCase): | ||
def test_parse_secret(self): | ||
self.assertEqual(parse_secret("secret_name", "project_name"), "SECRET_NAME:project_name/secret_name") | ||
self.assertEqual(parse_secret("secret_name/version", "project_name"), "SECRET_NAME:project_name/secret_name/version") | ||
self.assertEqual(parse_secret("123-456", "project_name"), "123_456:project_name/123-456") | ||
self.assertEqual(parse_secret("123___123___123", "project_name"), "123_123_123:project_name/123___123___123") | ||
|
||
def test_parse_secret_special(self): | ||
# FIXME: this test is failing and i dont know why | ||
self.assertEqual(parse_secret("123&&123()123__123*__*_123", "project_name"), "123_123_123_123:project_name/123&&123()123__123*__*_123") | ||
|
||
if __name__ == '__main__': | ||
unittest.main() |