コード例 #1
0
def test_unicode_to_python():
    ('Unicode#to_python() should prepare data to be serialized')

    # Given an instance of unicode
    instance = Unicode()

    # When I call to_python
    result = instance.to_python(u'unsafestring')

    # Then the result should be a dictionary with metadata
    result.should.equal({
        'module': 'repocket.attributes',
        'type': 'Unicode',
        'value': 'unsafestring',
    })
コード例 #2
0
def test_unicode_to_python():
    ('Unicode#to_python() should prepare data to be serialized')

    # Given an instance of unicode
    instance = Unicode()

    # When I call to_python
    result = instance.to_python(u'unsafestring')

    # Then the result should be a dictionary with metadata
    result.should.equal({
        'module': 'repocket.attributes',
        'type': 'Unicode',
        'value': 'unsafestring',
    })