@@ -113,23 +113,29 @@ def test_param_conversion(self):
113
113
('["Foo", true, false]' , "[10, 1]" , '["2017-12-22 16:07:01"]' ),
114
114
)
115
115
116
- @unittest .skipIf (connection .vendor in ('sqlite' , 'postgresql' ),
117
- 'Mixing bytestrings and text is not allowed on PostgreSQL and'
118
- 'SQLite' )
116
+ @unittest .skipIf (
117
+ connection .vendor in ("sqlite" , "postgresql" ),
118
+ "Mixing bytestrings and text is not allowed on PostgreSQL and SQLite"
119
+ )
119
120
def test_binary_param_force_text (self ):
120
121
self .assertEqual (len (self .panel ._queries ), 0 )
121
122
122
123
with connection .cursor () as cursor :
123
- cursor .execute ("SELECT * FROM auth_user WHERE username = %s" , [b'\xff ' ])
124
+ cursor .execute (
125
+ "SELECT * FROM auth_user WHERE username = %s" ,
126
+ [b'\xff ' ]
127
+ )
124
128
125
129
self .assertEqual (len (self .panel ._queries ), 1 )
126
- self .assertEqual (self .panel ._queries [0 ][1 ]['sql' ],
127
- "SELECT * FROM auth_user WHERE username = '\ufffd '" )
130
+ self .assertEqual (
131
+ self .panel ._queries [0 ][1 ]["sql" ],
132
+ "SELECT * FROM auth_user WHERE username = '\ufffd '"
133
+ )
128
134
129
135
self .panel .process_response (self .request , self .response )
130
136
self .panel .generate_stats (self .request , self .response )
131
137
132
- @unittest .skipUnless (connection .vendor != ' sqlite' , ' Test invalid for SQLite' )
138
+ @unittest .skipUnless (connection .vendor != " sqlite" , " Test invalid for SQLite" )
133
139
def test_raw_query_param_conversion (self ):
134
140
self .assertEqual (len (self .panel ._queries ), 0 )
135
141
0 commit comments