Skip to content

Commit a1fb864

Browse files
author
Aviv Laufer
committed
test_set_logger
1 parent f7037ec commit a1fb864

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_protoconfloader.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,19 @@ def test_on_modified_nonexistent_file():
150150
)
151151

152152

153+
def test_set_logger():
154+
# Setup
155+
config = Configuration(
156+
message=Mock(), config_path="crawler/text_crawler", logger=logging.getLogger()
157+
)
158+
new_logger = logging.getLogger("new_logger")
159+
160+
# Act
161+
config.set_logger(new_logger)
162+
163+
# Assert
164+
assert config.logger == new_logger
165+
166+
153167
if __name__ == "__main__":
154168
pytest.main()

0 commit comments

Comments
 (0)