test_azure_cosmos_3.py 404 B

123456
  1. def test_create_database(self, mock_cosmos):
  2. hook = AzureCosmosDBHook(azure_cosmos_conn_id='azure_cosmos_test_key_id')
  3. hook.create_database(self.test_database_name)
  4. expected_calls = [mock.call().create_database('test_database_name')]
  5. mock_cosmos.assert_any_call(self.test_end_point, {'masterKey': self.test_master_key})
  6. mock_cosmos.assert_has_calls(expected_calls)