2022-09-27 12:52:32 +00:00
|
|
|
from toxygen.middleware.tox_factory import *
|
2016-02-18 16:52:12 +00:00
|
|
|
|
2016-02-23 11:11:00 +00:00
|
|
|
|
2022-09-27 12:52:32 +00:00
|
|
|
# TODO: add new tests
|
|
|
|
|
2016-07-01 20:15:00 +00:00
|
|
|
class TestTox:
|
2016-02-23 11:11:00 +00:00
|
|
|
|
2016-03-06 12:44:52 +00:00
|
|
|
def test_creation(self):
|
2022-09-27 12:52:32 +00:00
|
|
|
name = 'Toxygen User'
|
|
|
|
status_message = 'Toxing on Toxygen'
|
2016-03-06 12:44:52 +00: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 19:12:37 +00:00
|
|
|
tox = tox_factory(data)
|
2022-09-27 12:52:32 +00:00
|
|
|
assert tox.self_get_name() == name
|
|
|
|
assert tox.self_get_status_message() == status_message
|