mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 18:20:58 +02:00
[Tests] Move assert_start_raises_init_error method to TestNode
This commit is contained in:
@ -24,12 +24,12 @@ class UacommentTest(BitcoinTestFramework):
|
||||
self.log.info("test -uacomment max length")
|
||||
self.stop_node(0)
|
||||
expected = "exceeds maximum length (256). Reduce the number or size of uacomments."
|
||||
self.assert_start_raises_init_error(0, ["-uacomment=" + 'a' * 256], expected)
|
||||
self.nodes[0].assert_start_raises_init_error(["-uacomment=" + 'a' * 256], expected)
|
||||
|
||||
self.log.info("test -uacomment unsafe characters")
|
||||
for unsafe_char in ['/', ':', '(', ')']:
|
||||
expected = "User Agent comment (" + unsafe_char + ") contains unsafe characters"
|
||||
self.assert_start_raises_init_error(0, ["-uacomment=" + unsafe_char], expected)
|
||||
self.nodes[0].assert_start_raises_init_error(["-uacomment=" + unsafe_char], expected)
|
||||
|
||||
if __name__ == '__main__':
|
||||
UacommentTest().main()
|
||||
|
Reference in New Issue
Block a user