-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
failing test for banner stripping trailing newlines during parsing
- Loading branch information
Jeff Kala
committed
Aug 27, 2024
1 parent
11f5e88
commit 78dd931
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
tests/unit/mock/config/parser/base/cisco_ios/ios_banner_newline_received.py
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,9 @@ | ||
from netutils.config.parser import ConfigLine | ||
|
||
data = [ | ||
ConfigLine(config_line="hostname banner_with_newline", parents=()), | ||
ConfigLine(config_line='banner login ^C', parents=()), | ||
ConfigLine(config_line='****************************************************\nWARNING TO UNAUTHORIZED USERS:\nThis system is for use by authorized users only.\n****************************************************\n^C', parents=('banner login ^C',)), | ||
ConfigLine(config_line="line vty 0 4", parents=()), | ||
ConfigLine(config_line=" transport ssh", parents=("line vty 0 4",)), | ||
] |
13 changes: 13 additions & 0 deletions
13
tests/unit/mock/config/parser/base/cisco_ios/ios_banner_newline_sent.txt
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,13 @@ | ||
hostname banner_with_newline | ||
! | ||
banner login ^C | ||
**************************************************** | ||
WARNING TO UNAUTHORIZED USERS: | ||
This system is for use by authorized users only. | ||
**************************************************** | ||
|
||
^C | ||
! | ||
line vty 0 4 | ||
transport ssh | ||
! |