@@ -1955,7 +1955,7 @@ def test_repr():
19551955 @staticmethod
19561956 def test__validate ():
19571957 prop = model .CompressedTextProperty (name = "text" )
1958- assert prop ._validate (u "abc" ) is None
1958+ assert prop ._validate ("abc" ) is None
19591959
19601960 @staticmethod
19611961 def test__validate_bad_bytes ():
@@ -1979,18 +1979,18 @@ def test__to_base_type():
19791979 def test__to_base_type_converted ():
19801980 prop = model .CompressedTextProperty (name = "text" )
19811981 value = b"\xe2 \x98 \x83 "
1982- assert prop ._to_base_type (u "\N{snowman} " ) == value
1982+ assert prop ._to_base_type ("\N{snowman} " ) == value
19831983
19841984 @staticmethod
19851985 def test__from_base_type ():
19861986 prop = model .CompressedTextProperty (name = "text" )
1987- assert prop ._from_base_type (u "abc" ) is None
1987+ assert prop ._from_base_type ("abc" ) is None
19881988
19891989 @staticmethod
19901990 def test__from_base_type_converted ():
19911991 prop = model .CompressedTextProperty (name = "text" )
19921992 value = b"\xe2 \x98 \x83 "
1993- assert prop ._from_base_type (value ) == u "\N{snowman} "
1993+ assert prop ._from_base_type (value ) == "\N{snowman} "
19941994
19951995 @staticmethod
19961996 def test__from_base_type_cannot_convert ():
@@ -2054,24 +2054,24 @@ def test__validate_bad_type():
20542054 @staticmethod
20552055 def test__to_base_type ():
20562056 prop = model .TextProperty (name = "text" )
2057- assert prop ._to_base_type (u "abc" ) is None
2057+ assert prop ._to_base_type ("abc" ) is None
20582058
20592059 @staticmethod
20602060 def test__to_base_type_converted ():
20612061 prop = model .TextProperty (name = "text" )
2062- value = u "\N{snowman} "
2062+ value = "\N{snowman} "
20632063 assert prop ._to_base_type (b"\xe2 \x98 \x83 " ) == value
20642064
20652065 @staticmethod
20662066 def test__from_base_type ():
20672067 prop = model .TextProperty (name = "text" )
2068- assert prop ._from_base_type (u "abc" ) is None
2068+ assert prop ._from_base_type ("abc" ) is None
20692069
20702070 @staticmethod
20712071 def test__from_base_type_converted ():
20722072 prop = model .TextProperty (name = "text" )
20732073 value = b"\xe2 \x98 \x83 "
2074- assert prop ._from_base_type (value ) == u "\N{snowman} "
2074+ assert prop ._from_base_type (value ) == "\N{snowman} "
20752075
20762076 @staticmethod
20772077 def test__from_base_type_cannot_convert ():
@@ -2222,22 +2222,22 @@ def test__validate_incorrect_type():
22222222 @staticmethod
22232223 def test__to_base_type ():
22242224 prop = model .JsonProperty (name = "json-val" )
2225- value = [14 , [15 , 16 ], {"seventeen" : 18 }, u "\N{snowman} " ]
2225+ value = [14 , [15 , 16 ], {"seventeen" : 18 }, "\N{snowman} " ]
22262226 expected = b'[14,[15,16],{"seventeen":18},"\\ u2603"]'
22272227 assert prop ._to_base_type (value ) == expected
22282228
22292229 @staticmethod
22302230 def test__from_base_type ():
22312231 prop = model .JsonProperty (name = "json-val" )
22322232 value = b'[14,true,{"a":null,"b":"\\ u2603"}]'
2233- expected = [14 , True , {"a" : None , "b" : u "\N{snowman} " }]
2233+ expected = [14 , True , {"a" : None , "b" : "\N{snowman} " }]
22342234 assert prop ._from_base_type (value ) == expected
22352235
22362236 @staticmethod
22372237 def test__from_base_type_str ():
22382238 prop = model .JsonProperty (name = "json-val" )
2239- value = u '[14,true,{"a":null,"b":"\\ u2603"}]'
2240- expected = [14 , True , {"a" : None , "b" : u "\N{snowman} " }]
2239+ value = '[14,true,{"a":null,"b":"\\ u2603"}]'
2240+ expected = [14 , True , {"a" : None , "b" : "\N{snowman} " }]
22412241 assert prop ._from_base_type (value ) == expected
22422242
22432243
@@ -2338,16 +2338,13 @@ def test__from_ds_entity():
23382338
23392339 @staticmethod
23402340 def test__from_ds_entity_with_user_id ():
2341- assert (
2342- model .User ._from_ds_entity (
2343- {
2344- "email" : "foo@example.com" ,
2345- "auth_domain" : "gmail.com" ,
2346- "user_id" : "12345" ,
2347- }
2348- )
2349- == model .User ("foo@example.com" , "gmail.com" , "12345" )
2350- )
2341+ assert model .User ._from_ds_entity (
2342+ {
2343+ "email" : "foo@example.com" ,
2344+ "auth_domain" : "gmail.com" ,
2345+ "user_id" : "12345" ,
2346+ }
2347+ ) == model .User ("foo@example.com" , "gmail.com" , "12345" )
23512348
23522349
23532350class TestUserProperty :
@@ -3151,8 +3148,8 @@ class Mine(model.Model):
31513148 mine = Mine (foo = "x" , bar = "y" )
31523149 comparison = prop ._comparison ("=" , mine )
31533150 compared = query_module .AND (
3154- query_module .FilterNode ("baz.bar" , "=" , u "y" ),
3155- query_module .FilterNode ("baz.foo" , "=" , u "x" ),
3151+ query_module .FilterNode ("baz.bar" , "=" , "y" ),
3152+ query_module .FilterNode ("baz.foo" , "=" , "x" ),
31563153 )
31573154 # Python 2 and 3 order nodes differently, sort them and test each one
31583155 # is in both lists.
@@ -3182,8 +3179,8 @@ class Mine(model.Model):
31823179 conjunction_nodes = sorted (
31833180 conjunction ._nodes , key = lambda a : getattr (a , "_name" , "z" )
31843181 )
3185- assert conjunction_nodes [0 ] == query_module .FilterNode ("bar.bar" , "=" , u "y" )
3186- assert conjunction_nodes [1 ] == query_module .FilterNode ("bar.foo" , "=" , u "x" )
3182+ assert conjunction_nodes [0 ] == query_module .FilterNode ("bar.bar" , "=" , "y" )
3183+ assert conjunction_nodes [1 ] == query_module .FilterNode ("bar.foo" , "=" , "x" )
31873184 assert conjunction_nodes [2 ].predicate .name == "bar"
31883185 assert sorted (conjunction_nodes [2 ].predicate .match_keys ) == [
31893186 "bar" ,
@@ -3940,7 +3937,7 @@ def test__validate_indexed_bytes():
39403937 @staticmethod
39413938 def test__validate_indexed_unicode ():
39423939 prop = model .GenericProperty (name = "generic" , indexed = True )
3943- assert prop ._validate (u "abc" ) is None
3940+ assert prop ._validate ("abc" ) is None
39443941
39453942 @staticmethod
39463943 def test__validate_indexed_bad_length ():
0 commit comments