Пример #1
0
def test_to_dict():
    mt = Light.from_single_value('mt_test', 100000)
    mdict = mt.to_dict()
    assert mdict['r_emittance'] == 100000
    assert mdict['b_emittance'] == 100000
    assert mdict['g_emittance'] == 100000
    assert mdict['type'] == 'Light'
    assert 'modifier' not in mdict or mdict['modifier'] is None
Пример #2
0
def test_from_single_value():
    mt = Light.from_single_value('mt_test', 100000)
    assert mt.r_emittance == 100000
    assert mt.g_emittance == 100000
    assert mt.b_emittance == 100000