(self)
| 1207 | |
| 1208 | @client_context.require_auth |
| 1209 | def test_username_and_password(self): |
| 1210 | client_context.create_user("admin", "ad min", "pa/ss") |
| 1211 | self.addCleanup(client_context.drop_user, "admin", "ad min") |
| 1212 | |
| 1213 | c = self.rs_or_single_client_noauth(username="ad min", password="pa/ss") |
| 1214 | |
| 1215 | # Username and password aren't in strings that will likely be logged. |
| 1216 | self.assertNotIn("ad min", repr(c)) |
| 1217 | self.assertNotIn("ad min", str(c)) |
| 1218 | self.assertNotIn("pa/ss", repr(c)) |
| 1219 | self.assertNotIn("pa/ss", str(c)) |
| 1220 | |
| 1221 | # Auth succeeds. |
| 1222 | c.server_info() |
| 1223 | |
| 1224 | with self.assertRaises(OperationFailure): |
| 1225 | (self.rs_or_single_client_noauth(username="ad min", password="foo")).server_info() |
| 1226 | |
| 1227 | @client_context.require_auth |
| 1228 | @client_context.require_no_fips |
nothing calls this directly
no test coverage detected