Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Technik
protocol-translation-live
Commits
4e0e3f27
Commit
4e0e3f27
authored
Mar 29, 2022
by
Jakob Lerch
Browse files
add test_etherpad
parent
04ff06f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_etherpad.py
0 → 100644
View file @
4e0e3f27
from
configparser
import
ConfigParser
from
functools
import
cache
from
protocol_translator.pad
import
Etherpad
@
cache
def
init
():
api_keys
=
ConfigParser
()
api_keys
.
read
(
"api_keys.conf"
)
e
=
Etherpad
(
"https://collab.fem-net.de/pad/p/test2"
,
api_keys
[
"default"
][
"etherpad_key"
])
return
e
def
test_init
():
e
=
init
()
assert
isinstance
(
e
,
pad
.
Etherpad
)
def
test_read
():
e
=
init
()
assert
e
.
read
()
==
"testtest"
def
test_write
():
e
=
init
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment