2018-05-23 18:32:14 +00:00
|
|
|
from toxygen.middleware.tox_factory import *
|
2016-02-18 16:52:12 +00:00
|
|
|
|
2016-02-23 11:11:00 +00:00
|
|
|
|
2018-05-23 18:23:51 +00:00
|
|
|
# TODO: add new tests
|
2018-04-17 12:14:05 +00:00
|
|
|
|
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):
|
2018-07-21 17:43:16 +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)
|
2018-07-21 17:43:16 +00:00
|
|
|
assert tox.self_get_name() == name
|
|
|
|
assert tox.self_get_status_message() == status_message
|