Skip to content

Commit

Permalink
Fix: Corrección para los test de d'hondt; #2
Browse files Browse the repository at this point in the history
  • Loading branch information
isamunval committed Jan 7, 2022
1 parent bd4e28c commit fee9850
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 29 deletions.
1 change: 0 additions & 1 deletion decide/authentication/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@
path('getuser/', GetUserView.as_view()),
path('register/', RegisterView.as_view()),
path('signin/',TemplateView.as_view(template_name="login.html")),
path('accounts/',include('allauth.urls')),
]
29 changes: 11 additions & 18 deletions decide/decide/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@
'gateway',


'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.microsoft',
'allauth.socialaccount.providers.azure',
'allauth.socialaccount.providers.google',

]

REST_FRAMEWORK = {
Expand Down Expand Up @@ -202,18 +195,18 @@

INSTALLED_APPS = INSTALLED_APPS + MODULES

AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend'
)
#AUTHENTICATION_BACKENDS = (
# 'django.contrib.auth.backends.ModelBackend',
# 'allauth.account.auth_backends.AuthenticationBackend'
#)

SITE_ID = 2
#SITE_ID = 2

LOGIN_REDIRECT_URL = '/'
#LOGIN_REDIRECT_URL = '/'

NOSE_ARGS = [
'--with-xunit'
]
#NOSE_ARGS = [
#'--with-xunit'
#]

import django_heroku
django_heroku.settings(locals(),test_runner=False)
#import django_heroku
#django_heroku.settings(locals(),test_runner=False)
10 changes: 0 additions & 10 deletions decide/postproc/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,21 +579,11 @@ def test_bordaPos2(self):
{ "option": "Option 2", "number": 5, "votes": 23, "group":"g2", "total":135}

]
<<<<<<< HEAD


response = self.client.post('/postproc/', data, format='json')
self.assertEqual(response.status_code, 200)

values = response.json()
self.assertEqual(values, expected_result)
=======


response = self.client.post('/postproc/', data, format='json')
self.assertEqual(response.status_code, 200)

values = response.json()
self.assertEqual(values, expected_result)

>>>>>>> c8c80318256ee0c89ea639090ff4b3f9a2b9a5ec
1 change: 1 addition & 0 deletions decide/postproc/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,4 @@ def post(self, request):
return Response(self.dhondt(opts, s))

return Response({})

0 comments on commit fee9850

Please sign in to comment.