-
-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #378 from GramAddict/update-fixes
Fix account selecting
- Loading branch information
Showing
11 changed files
with
99 additions
and
60 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
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
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
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
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,2 +1,2 @@ | ||
# that file is deprecated, current version is now stored in GramAddict/__init__.py | ||
__version__ = "3.2.9" | ||
__version__ = "3.2.10" |
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,24 @@ | ||
from GramAddict.core.interaction import _load_and_clean_txt_file | ||
|
||
|
||
def test_load_txt_ok(mocker): | ||
mocker.patch("os.path.join", return_value="txt/txt_ok.txt") | ||
message = _load_and_clean_txt_file("test_user", "txt_filename") | ||
assert message is not None | ||
assert message == [ | ||
"Hello, test_user! How are you today?", | ||
"Hello everyone!", | ||
"Goodbye, test_user! Have a great day!", | ||
] | ||
|
||
|
||
def test_load_txt_empty(mocker): | ||
mocker.patch("os.path.join", return_value="txt/txt_empty.txt") | ||
message = _load_and_clean_txt_file("test_user", "txt_filename") | ||
assert message is None | ||
|
||
|
||
def test_load_txt_not_exists(mocker): | ||
mocker.patch("os.path.join", return_value="txt/txt_not_exists.txt") | ||
message = _load_and_clean_txt_file("test_user", "txt_filename") | ||
assert message is None |
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,5 @@ | ||
|
||
|
||
|
||
|
||
|
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,6 @@ | ||
|
||
Hello, test_user! How are you today? | ||
Hello everyone! | ||
|
||
Goodbye, test_user! Have a great day! | ||
|