(self)
| 784 | @client_context.require_auth |
| 785 | @client_context.require_no_api_version |
| 786 | def setUp(self): |
| 787 | super().setUp() |
| 788 | client_context.create_user(self.db.name, "readonly", "pw", ["read"]) |
| 789 | self.db.command( |
| 790 | "createRole", |
| 791 | "noremove", |
| 792 | privileges=[ |
| 793 | { |
| 794 | "actions": ["insert", "update", "find"], |
| 795 | "resource": {"db": "pymongo_test", "collection": "test"}, |
| 796 | } |
| 797 | ], |
| 798 | roles=[], |
| 799 | ) |
| 800 | |
| 801 | client_context.create_user(self.db.name, "noremove", "pw", ["noremove"]) |
| 802 | |
| 803 | def tearDown(self): |
| 804 | self.db.command("dropRole", "noremove") |
nothing calls this directly
no test coverage detected