Skip to content

Commit

Permalink
Update package version to 3.0.1 (#236)
Browse files Browse the repository at this point in the history
* Update package version to 3.0.1

The version number in three places: __init__.py, conf.py in the docs source, and the installation instructions in the docs source has been updated from 3.0.0 to 3.0.1 to reflect the latest changes.

* Update database settings and test view

Detailed test settings for the database have been added, including default credentials and database name. Test local databases are now defaulting to PORT 666 if no environment variable is set. Additionally, the id used for forcing authentication in the test view has been changed and as a result, the expected response status code is also updated.
  • Loading branch information
wagnerdelima authored Jul 11, 2024
1 parent c139999 commit 3fb74bb
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
project = 'drf-social-oauth2'
copyright = '2024, Wagner de Lima'
author = 'Wagner de Lima'
release = '3.0.0'
release = '3.0.1'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This framework is published at the PyPI, install it with pip:

.. code-block:: console
$ pip install drf_social_oauth2==3.0.0
$ pip install drf_social_oauth2==3.0.1
To enable OAuth2 social authentication support for your Django REST Framework application, you need to install
Expand Down
2 changes: 1 addition & 1 deletion drf_social_oauth2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
and a ton more!
"""

__version__ = '3.0.0'
__version__ = '3.0.1'

try:
from secrets import SystemRandom
Expand Down
14 changes: 13 additions & 1 deletion drf_social_oauth2/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,22 @@
]

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'database',
'HOST': 'db',
'PORT': 5432,
'USER': 'user',
'PASSWORD': 'password',
}
}


TEST_LOCAL_DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'HOST': os.getenv('HOST'),
'PORT': int(os.getenv('PORT')),
'PORT': int(os.getenv('PORT', 666)),
'NAME': os.getenv(
'POSTGRES_DB',
),
Expand Down
4 changes: 2 additions & 2 deletions tests/drf_social_oauth2/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ def test_revoke_invalid_token_endpoint(client_api, user, application):
client_api.force_authenticate(user=user)
response = client_api.post(
reverse('revoke_token'),
data={'client_id': 'id'},
data={'client_id': 'new id'},
format='json',
)
assert response.status_code == 401
assert response.status_code == 400


def test_get_application(application):
Expand Down

0 comments on commit 3fb74bb

Please sign in to comment.