def test_pack_mixed_object(): obj = ScriptDataObject() # Preserves insertion order obj["number"] = 123 obj["string"] = "foobar" obj["bool"] = True assert ScriptDataObject.pack(obj) == MIXED_VALUES
def test_pack_booleans_object(): assert ScriptDataObject.pack(ScriptDataObject(foo=True)) == BOOLEAN_VALUE
def test_pack_strings_object(): assert ScriptDataObject.pack(ScriptDataObject(foo="bar")) == STRING_VALUE
def test_pack_numbers_object(): assert ScriptDataObject.pack(ScriptDataObject(foo=123)) == NUMBER_VALUE
def test_pack_empty_object(): assert ScriptDataObject.pack(ScriptDataObject()) == EMPTY_OBJECT