-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cambios en configuracion de participantes
- Loading branch information
Showing
7 changed files
with
50 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,3 @@ | |
|
||
class ActasConfig(AppConfig): | ||
name = 'actas' | ||
|
||
participantes_min = 4 | ||
participantes_max = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.apps import apps | ||
from django.test import TestCase | ||
from django.test.utils import override_settings | ||
|
||
|
||
class AppTestCase(TestCase): | ||
|
||
def tearDown(self): | ||
apps.clear_cache() | ||
|
||
def test_get_name(self): | ||
with override_settings(INSTALLED_APPS=['actas']): | ||
self.assertEquals('actas', apps.get_app_config('actas').name) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,39 @@ | ||
# -*- coding: utf-8 -*- | ||
from django.test import TestCase, Client | ||
from django.core.urlresolvers import reverse | ||
|
||
from ..apps import ActasConfig | ||
from django.test.utils import override_settings | ||
|
||
|
||
class ViewsSubirConfirmarTestCase(TestCase): | ||
|
||
def setup(self): | ||
self.client = Client() | ||
|
||
def test_obtener_acta_base(self): | ||
def test_obtener_acta_base_defecto(self): | ||
|
||
expected = { | ||
u'min_participantes': ActasConfig.participantes_min, | ||
u'max_participantes': ActasConfig.participantes_max, | ||
u'min_participantes': 4, | ||
u'max_participantes': 10, | ||
u'geo': {}, | ||
u'participantes': [{} for _ in range(ActasConfig.participantes_min)], | ||
u'participantes': [{} for _ in range(4)], | ||
u'itemsGroups': [], # TODO: Fix this | ||
} | ||
|
||
response = self.client.get(reverse('actas:base')) | ||
self.assertEquals(200, response.status_code) | ||
self.assertEquals(expected, response.json()) | ||
|
||
def test_obtener_acta_base_settings_py(self): | ||
|
||
expected = { | ||
u'min_participantes': 5, | ||
u'max_participantes': 9, | ||
u'geo': {}, | ||
u'participantes': [{} for _ in range(5)], | ||
u'itemsGroups': [], # TODO: Fix this | ||
} | ||
|
||
with override_settings(DISCUSION_ABIERTA={'PARTICIPANTES_MIN': expected['min_participantes'], 'PARTICIPANTES_MAX': expected['max_participantes']}): | ||
response = self.client.get(reverse('actas:base')) | ||
self.assertEquals(200, response.status_code) | ||
self.assertEquals(expected, response.json()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Django==1.9.8 | ||
Django==1.10 | ||
pyquery==1.2.13 | ||
requests==2.10.0 | ||
requests==2.11.1 |