def to_son(self):
        field = UUIDField()

        uuid = uuid4()

        expect(field.to_son(uuid)).to_equal(uuid)
        expect(field.to_son(str(uuid))).to_equal(uuid)
Esempio n. 2
0
    def test_to_son(self):
        field = UUIDField()

        uuid = uuid4()

        expect(field.to_son(uuid)).to_equal(uuid)
        expect(field.to_son(str(uuid))).to_equal(uuid)
        expect(field.to_son(None)).to_be_null()