-
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.
- Loading branch information
1 parent
6257a82
commit 14aee38
Showing
5 changed files
with
50 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -1,10 +1,13 @@ | ||
# From https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore | ||
|
||
.coverage | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# Distribution / packaging | ||
*.egg-info/ | ||
dist/ | ||
dist/ | ||
build/ |
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,28 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from pathlib import Path | ||
from tempfile import TemporaryDirectory | ||
import unittest | ||
|
||
from godaddyip.__main__ import Config, previous_value, store_value | ||
|
||
|
||
class TestGodaddyIp(unittest.TestCase): | ||
def test_config_load(self) -> None: | ||
tests_src_path = Path(__file__).parent | ||
unittest_config_path = tests_src_path / "unittest.yml" | ||
config = Config(unittest_config_path) | ||
self.assertEqual("unittest", config["arecord"]) | ||
|
||
def test_store_previous_value(self) -> None: | ||
with TemporaryDirectory() as td: | ||
td_path = Path(td) | ||
store_value(td_path, "unittest", "unittest") | ||
self.assertEqual( | ||
"unittest", | ||
previous_value(td_path, "unittest"), | ||
) | ||
|
||
|
||
if __name__ == "__main__": # pragma: no cover | ||
unittest.main() |
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,7 @@ | ||
arecord: unittest | ||
aaaarecord: unittest | ||
key: ABC6969 | ||
secret: zYU0069 | ||
domain: unittest.com | ||
cnames: | ||
- testing |