Skip to content

Commit

Permalink
fix connect to azure cosmosdb
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Dec 12, 2021
1 parent 04f4aef commit 9f559e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nmongo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ def auth(self, user, password):
else:
salted_pass = hashlib.pbkdf2_hmac(
'sha1',
password.encode('utf-8'),
password,
base64.standard_b64decode(reply_payload['s']),
reply_payload['i'],
)
Expand Down
4 changes: 1 addition & 3 deletions test_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class TestAzureCosmosDB(TestBase, unittest.TestCase):
use_ssl = True

def test_azure(self):
# Azure CosmosDB ignore option's name parameter
self.db.pets.createIndex(
{'name': 1, 'gender': -1},
options={'name': 'name1'}
Expand All @@ -52,8 +51,7 @@ def test_azure(self):

indexes = self.db.pets.getIndexes()
self.assertEqual(3, len(indexes))

self.db.pets.dropIndex('name_1_gender_-1') # drop name1
self.db.pets.dropIndex('name1') # drop name1
self.assertEqual(len(self.db.pets.getIndexes()), 2)

self.db.pets.dropIndexes()
Expand Down

0 comments on commit 9f559e4

Please sign in to comment.