def test_to_query(self):
     field = ListField(StringField())
     field.from_son(["1", "2", "3"])
     expect(field.to_query(["1", "2", "3"])).to_equal({
         "$all": ["1", "2", "3"]
     })
     expect(field.to_query("string")).to_equal("string")
    def test_from_son(self):
        field = ListField(StringField())

        expect(field.from_son([])).to_equal([])
        expect(field.from_son(None)).to_equal([])
        expect(field.from_son(["1", "2", "3"])).to_equal(["1", "2", "3"])