toxygen/tests/tests.py

19 lines
490 B
Python
Raw Normal View History

2018-05-23 20:32:14 +02:00
from toxygen.middleware.tox_factory import *
2016-02-23 12:11:00 +01:00
2018-05-23 20:23:51 +02:00
# TODO: add new tests
2016-07-01 22:15:00 +02:00
class TestTox:
2016-02-23 12:11:00 +01:00
2016-03-06 13:44:52 +01:00
def test_creation(self):
2018-07-21 19:43:16 +02:00
name = 'Toxygen User'
status_message = 'Toxing on Toxygen'
2016-03-06 13:44:52 +01:00
tox = tox_factory()
tox.self_set_name(name)
tox.self_set_status_message(status_message)
data = tox.get_savedata()
del tox
2016-03-15 20:12:37 +01:00
tox = tox_factory(data)
2018-07-21 19:43:16 +02:00
assert tox.self_get_name() == name
assert tox.self_get_status_message() == status_message