2022-09-27 14:52:32 +02:00
|
|
|
from toxygen.middleware.tox_factory import *
|
2016-02-18 17:52:12 +01:00
|
|
|
|
2016-02-23 12:11:00 +01:00
|
|
|
|
2022-09-27 14:52:32 +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):
|
2022-09-27 14:52:32 +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)
|
2022-09-27 14:52:32 +02:00
|
|
|
assert tox.self_get_name() == name
|
|
|
|
assert tox.self_get_status_message() == status_message
|