Skip to content

Commit

Permalink
FIx incorrect arguments when calling initialize_api
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarchmer committed Aug 25, 2023
1 parent e1a9990 commit 0f4093a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### v0.9.2 (2023-08-25)

* Fix bug using BaseFacade

### v0.9.1 (2023-08-20)

* Fix bug using old Facade instead of BaseFacade
Expand Down
2 changes: 1 addition & 1 deletion drf_client/helpers/base_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def main(self):
"""
self.domain = self.get_domain()
# Create a static pointer to the API for global access
BaseFacade.initialize_api(options=self.get_options(), args=self.args)
BaseFacade.initialize_api(api_options=self.get_options(), cmd_args=self.args)
self.api = BaseFacade.api
self.before_login()
ok = self.login()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="django-rest-framework-client",
version="0.9.1",
version="0.9.2",
description="Python client for a DjangoRestFramework based web site",
long_description=README,
long_description_content_type="text/markdown",
Expand Down
3 changes: 1 addition & 2 deletions tests/helpers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""test Resource class."""
import argparse
import unittest

from drf_client.helpers.base_facade import BaseFacade
Expand All @@ -10,6 +9,6 @@ class FacadeTestCase(unittest.TestCase):

def test_initialize_facade(self):
"""Test Initializer."""
BaseFacade.initialize_api({"DOMAIN": "https://example.com"})
BaseFacade.initialize_api(api_options={"DOMAIN": "https://example.com"})
assert BaseFacade.api_options["DOMAIN"] == "https://example.com"
assert BaseFacade.api is not None

0 comments on commit 0f4093a

Please sign in to comment.