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