Example #1
0
def test_autouuid_to_json():
    ('AutoUUID.to_json() should deserialize the given dict into a value')

    # Given an instance of autouuid
    autouuid = AutoUUID()

    # When I call to_json
    result = autouuid.to_json('3112edba-4b5d-11e5-b02e-6c4008a70392')

    # Then the result should be a value
    result.should.equal(
        '{"type": "AutoUUID", "value": "3112edba-4b5d-11e5-b02e-6c4008a70392", "module": "repocket.attributes"}'
    )
Example #2
0
def test_autouuid_to_json():
    ('AutoUUID.to_json() should deserialize the given dict into a value')

    # Given an instance of autouuid
    autouuid = AutoUUID()

    # When I call to_json
    result = autouuid.to_json('3112edba-4b5d-11e5-b02e-6c4008a70392')

    # Then the result should be a value
    result.should.equal(
        '{"type": "AutoUUID", "value": "3112edba-4b5d-11e5-b02e-6c4008a70392", "module": "repocket.attributes"}'
    )