Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F12297829
test_page.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
test_page.py
View Options
# -------------------------------------------------------------
# Rhyne-Wyse :: Tests :: Wiki :: Page
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: BSD-2-Clause
# -------------------------------------------------------------
import
unittest
from
rhyne_wyse.wiki.page
import
replace_between_markers
class
PageTest
(
unittest
.
TestCase
):
def
test_replace_between_markers
(
self
):
current
=
"""The tree is:
[TREE]
Fir
[/TREE]
"""
expected
=
"""The tree is:
[TREE]
Abies Electronicus
[/TREE]
"""
actual
=
replace_between_markers
(
current
,
"[TREE]"
,
"[/TREE]"
,
"Abies Electronicus"
,
)
self
.
assertEqual
(
expected
,
actual
)
def
test_replace_between_markers_when_missing
(
self
):
self
.
assertRaises
(
ValueError
,
replace_between_markers
,
"The tree is: Fir"
,
"[TREE]"
,
"[/TREE]"
,
"Abies Electronicus"
,
)
if
__name__
==
"__main__"
:
unittest
.
main
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Wed, Oct 22, 13:21 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3091301
Default Alt Text
test_page.py (1 KB)
Attached To
Mode
rRPRT Nasqueron internal reports
Attached
Detach File
Event Timeline
Log In to Comment