Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Update #398

Open
wants to merge 30 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
644daf7
Update pytest-splinter from 1.7.* to 1.8.1
pyup-bot Dec 30, 2016
c2990c4
Update dj-database-url from 0.3.* to 0.4.1
pyup-bot Dec 30, 2016
ae06c0c
Update ipython from 4.0.0 to 5.1.0
pyup-bot Dec 30, 2016
aeb539a
Update fake-factory from 0.5.7 to 9999.9.9
pyup-bot Dec 30, 2016
6e58447
Update python-dateutil from 2.5.0 to 2.6.0
pyup-bot Dec 30, 2016
72d27dc
Update markdown from 2.6.5 to 2.6.7
pyup-bot Dec 30, 2016
230078f
Update pdbpp from 0.8.* to 0.8.3
pyup-bot Dec 30, 2016
c3b4abf
Update coverage from 4.* to 4.3.1
pyup-bot Dec 30, 2016
222830e
Update uwsgi from 2.0.* to 2.0.14
pyup-bot Dec 30, 2016
05af715
Update flake8 from 2.4.* to 3.2.1
pyup-bot Dec 30, 2016
d4cab64
Update pytest-django from 2.9.* to 3.1.2
pyup-bot Dec 30, 2016
e44c076
Update djangorestframework from 3.2.4 to 3.5.3
pyup-bot Dec 30, 2016
83f4175
Update django from 1.8.11 to 1.10.4
pyup-bot Dec 30, 2016
f9a1a09
Update fancycompleter from 0.4 to 0.7
pyup-bot Dec 30, 2016
7520165
Update twython from 3.3.0 to 3.4.0
pyup-bot Dec 30, 2016
d30776f
Update django-braces from 1.8.1 to 1.10.0
pyup-bot Dec 30, 2016
bf46611
Update django-extensions from 1.5.2 to 1.7.5
pyup-bot Dec 30, 2016
da00f2d
Update celery from 3.1.23 to 4.0.2
pyup-bot Dec 30, 2016
7419c22
Update django-filter from 0.13.0 to 1.0.1
pyup-bot Dec 30, 2016
26d40aa
Update django-autocomplete-light from 3.1.3 to 3.2.1
pyup-bot Dec 30, 2016
65bd647
Update pillow from 3.1.1 to 3.4.2
pyup-bot Dec 30, 2016
0bd81da
Update factory-boy from 2.5.* to 2.8.1
pyup-bot Dec 30, 2016
8aede4c
Update pytest-cov from 2.2.* to 2.4.0
pyup-bot Dec 30, 2016
46dc578
Update django-allauth from 0.25.2 to 0.29.0
pyup-bot Dec 30, 2016
70c6ce7
Update psycopg2 from 2.6.1 to 2.6.2
pyup-bot Dec 30, 2016
4a562c9
Fixed the requirement issue for celery
Dec 30, 2016
f3e9afe
Made changes as per django 1.10
Dec 30, 2016
3bed5c9
flake8 changes
Dec 30, 2016
882e98e
Merge branch 'development' into pyup-initial-update
Jan 15, 2017
f1290a4
Change URL as per django 1.10
Jan 15, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# For server.
# -------------------------------
uwsgi==2.0.*
dj-database-url==0.3.*
uwsgi==2.0.14
dj-database-url==0.4.1

# this file in this path is required for python buildpack.
26 changes: 13 additions & 13 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
# python==3.5.0
Django==1.8.11
django-braces==1.8.1
Django==1.10.4
django-braces==1.10.0

# Utilities
# --------------------------------------
unicode-slugify==0.1.3

# Persistent Store
# --------------------------------------
psycopg2==2.6.1
psycopg2==2.6.2

# Rest FrameWork
#---------------------------------------
djangorestframework==3.2.4
django-filter==0.13.0
django-allauth==0.25.2
djangorestframework==3.5.3
django-filter==1.0.1
django-allauth==0.29.0

# MarkDown Support
# ---------------------------------------
Markdown==2.6.5
Markdown==2.6.7

# Sample Data
# -----------------------------------------
fake-factory==0.5.7
fake-factory==9999.9.9

# Twitter Connect
# ---------------------------------------
twython==3.3.0
twython==3.4.0

#AutoComplete
#------------------------------------------
django-autocomplete-light==3.1.3
django-autocomplete-light==3.2.1

# Image
# ----------------------------------------
Pillow==3.1.1
Pillow==3.4.2

# Dateutils
#-----------------------------------------
python-dateutil==2.5.0
python-dateutil==2.6.0

# Captcha
#-----------------------------------------
django-simple-math-captcha==1.0.7

# Celery
# --------------------------------------------------
celery==3.1.23
celery>=3.1.15,<4.0
django-celery==3.1.17
redis==2.10.5
20 changes: 10 additions & 10 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@

# Debugging
# -------------------------------------------------
django-extensions==1.5.2
ipython==4.0.0
django-extensions==1.7.5
ipython==5.1.0


# Testing
# -------------------------------------------------
pytest-django==2.9.*
pytest-cov==2.2.*
pytest-splinter==1.7.*
factory_boy==2.5.*
pdbpp==0.8.*
fancycompleter==0.4
pytest-django==3.1.2
pytest-cov==2.4.0
pytest-splinter==1.8.1
factory-boy==2.8.1
pdbpp==0.8.3
fancycompleter==0.7

coverage==4.*
flake8==2.4.*
coverage==4.3.1
flake8==3.2.1
2 changes: 1 addition & 1 deletion settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django.template.context_processors.media',
'django.core.context_processors.request',
# 'django.core.context_processors.request',
'wye.base.context_processors.site_info',
],
},
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/test_edit_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_signup_college_poc_flow(base_url, browser, outbox):
user = f.create_user()
user.set_password('123123')
user.save()
url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
browser.visit(url)
browser.fill('login', user.email)
browser.fill('password', '123123')
Expand Down Expand Up @@ -94,7 +94,7 @@ def test_signup_tutor_flow(base_url, browser, outbox):
user = f.create_user()
user.set_password('123123')
user.save()
url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
browser.visit(url)
browser.fill('login', user.email)
browser.fill('password', '123123')
Expand Down
8 changes: 4 additions & 4 deletions tests/functional/test_workshops_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_workshop_wrong_action(base_url, browser, outbox):
user = f.create_user()
user.set_password('123123')
user.save()
url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
browser.visit(url)
browser.fill('login', user.email)
browser.fill('password', '123123')
Expand Down Expand Up @@ -42,7 +42,7 @@ def test_workshop_wrong_action(base_url, browser, outbox):
workshop.status = WorkshopStatus.REQUESTED
workshop.location = org.location
workshop.save()
url = base_url + '/workshop/update/{}/'.format(workshop.id)
url = base_url + '/accounts/login/'
browser.visit(url)
browser.fill('login', user.email)
browser.fill('password', '123123')
Expand Down Expand Up @@ -84,7 +84,7 @@ def test_workshop_flow(base_url, browser, outbox):
user = f.create_user()
user.set_password('123123')
user.save()
url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
browser.visit(url)
browser.fill('login', user.email)
browser.fill('password', '123123')
Expand Down Expand Up @@ -116,7 +116,7 @@ def test_workshop_flow(base_url, browser, outbox):
workshop.expected_date = datetime.now() + timedelta(days=20)
workshop.presenter.add(user)
workshop.save()
url = base_url + '/workshop/update/{}/'.format(workshop.id)
url = base_url + '/accounts/login/'
browser.visit(url)
browser.fill('login', user.email)
browser.fill('password', '123123')
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/workshop/test_create_workshop.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_workshop_create(base_url, browser, outbox):
poc_type = f.create_usertype(slug='poc', display_name='poc')
state = f.create_state()
user = base.create_user(password)
url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
base.login_and_confirm(browser, url, outbox, user, password)
user.save()
location = f.create_locaiton(name='location1')
Expand All @@ -23,7 +23,7 @@ def test_workshop_create(base_url, browser, outbox):

user.profile.save()

url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
base.login(browser, url, user, password)

# validate if user belongs to organisation
Expand Down
74 changes: 1 addition & 73 deletions tests/functional/workshop/test_workshop_celery_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_workshop_celery_task(base_url, browser, outbox):
state = f.create_state()
# Testcase with usertyep poc
user = base.create_user(password)
url = base_url + '/workshop/'
url = base_url + '/login/'
base.login_and_confirm(browser, url, outbox, user, password)
user.profile.usertype.clear()
user.profile.usertype.add(poc_type)
Expand Down Expand Up @@ -57,75 +57,3 @@ def test_workshop_celery_task(base_url, browser, outbox):
workshop.save()
rst = workshop_feedback.apply(args=(1,)).get()
assert rst
# url = base_url + '/workshop/'
# base.login(browser, url, user, password)
# data_check = browser.find_by_text(org.name)
# assert data_check

# browser.visit(url + "?location={}".format(org.location.id))
# data_check = browser.find_by_text(org.name)
# assert data_check

# browser.visit(url + "?location={}".format(org.location.id + 1))
# data_check = browser.find_by_text(org.name)
# assert not data_check

# browser.visit(url + "?presenter={}".format(user.id))
# data_check = browser.find_by_text(org.name)
# assert not data_check

# browser.visit(url + "?status={}".format(WorkshopStatus.REQUESTED))
# data_check = browser.find_by_text(org.name)
# assert data_check

# browser.visit(url + "?level={}".format(WorkshopStatus.ACCEPTED))
# data_check = browser.find_by_text(org.name)
# assert not data_check

# # Testcase for usertype tutor
# browser.visit(base_url + "/accounts/logout")
# user = base.create_user(password)
# url = base_url + '/workshop/'
# base.login_and_confirm(browser, url, outbox, user, password)
# # user.profile.usertype.add(tutor_type)
# # user.save()

# # url = base_url + '/workshop/'
# # base.login(browser, url, user, password)
# # # User not associate with workshop
# # data_check = browser.find_by_text(org.name)
# # assert [] == data_check

# # User associated with workshop
# workshop.presenter.add(user)
# browser.visit(url)
# # data_check = browser.find_by_text(org.name)
# # assert data_check

# # Testcase for lead
# browser.visit(base_url + "/accounts/logout")
# user = base.create_user(password)
# url = base_url + '/workshop/'
# base.login_and_confirm(browser, url, outbox, user, password)

# user.profile.usertype.add(regional_lead_type)
# user.save()
# lead = RegionalLead.objects.create(location=org.location)
# lead.leads.add(user)

# url = base_url + '/workshop/'
# base.login(browser, url, user, password)
# # data_check = browser.find_by_text(org.name)
# # assert data_check

# # Testcase for user with no usertype
# browser.visit(base_url + "/accounts/logout")
# user = base.create_user(password)
# url = base_url + '/workshop/'
# base.login_and_confirm(browser, url, outbox, user, password)

# url = base_url + '/workshop/'
# base.login(browser, url, user, password)
# # data_check = browser.find_by_text(org.name)
# # assert [] == data_check
# browser.visit(base_url + "/accounts/logout")
18 changes: 9 additions & 9 deletions tests/functional/workshop/test_workshop_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_workshop_list(base_url, browser, outbox):
state = f.create_state()
# Testcase with usertyep poc
user = base.create_user(password)
url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
base.login_and_confirm(browser, url, outbox, user, password)
user.profile.usertype.clear()
user.profile.usertype.add(poc_type)
Expand All @@ -52,11 +52,11 @@ def test_workshop_list(base_url, browser, outbox):
workshop.location = org.location
workshop.save()

url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
base.login(browser, url, user, password)
data_check = browser.find_by_text(org.name)
assert data_check

url = base_url + '/workshop/'
browser.visit(url + "?location={}".format(org.location.id))
data_check = browser.find_by_text(org.name)
assert data_check
Expand All @@ -80,7 +80,7 @@ def test_workshop_list(base_url, browser, outbox):
# Testcase for usertype tutor
browser.visit(base_url + "/accounts/logout")
user = base.create_user(password)
url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
base.login_and_confirm(browser, url, outbox, user, password)
# user.profile.usertype.add(tutor_type)
# user.save()
Expand All @@ -100,27 +100,27 @@ def test_workshop_list(base_url, browser, outbox):
# Testcase for lead
browser.visit(base_url + "/accounts/logout")
user = base.create_user(password)
url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
base.login_and_confirm(browser, url, outbox, user, password)

user.profile.usertype.add(regional_lead_type)
user.save()
lead = RegionalLead.objects.create(location=org.location)
lead.leads.add(user)

url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
base.login(browser, url, user, password)
# data_check = browser.find_by_text(org.name)
# assert data_check

# Testcase for user with no usertype
browser.visit(base_url + "/accounts/logout")
user = base.create_user(password)
url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
base.login_and_confirm(browser, url, outbox, user, password)

url = base_url + '/workshop/'
url = base_url + '/accounts/login/'
base.login(browser, url, user, password)
# data_check = browser.find_by_text(org.name)
# assert [] == data_check
url = base_url + '/accounts/login/'
browser.visit(base_url + "/accounts/logout")
1 change: 1 addition & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ def reconnect():

return disconnect, reconnect


disconnect_signals, reconnect_signals = signals_switch()
2 changes: 1 addition & 1 deletion wye/organisations/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import uuid

from django.conf import settings
from django.conf.urls import patterns, url
from django.conf.urls import url
from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.core.urlresolvers import reverse_lazy
from django.http import Http404
Expand Down
5 changes: 2 additions & 3 deletions wye/workshops/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class WorkshopAdmin(admin.ModelAdmin):
'status')
list_filter = ('is_active', 'status', 'workshop_level', 'location')

admin.site.register(models.Workshop, WorkshopAdmin)


class WorkshopFeedBackAdmin(admin.ModelAdmin):
list_per_page = 50
Expand All @@ -30,8 +28,9 @@ class WorkshopFeedBackAdmin(admin.ModelAdmin):
'status')
list_filter = ('feedback_type',)

admin.site.register(models.WorkshopFeedBack, WorkshopFeedBackAdmin)

admin.site.register(models.Workshop, WorkshopAdmin)
admin.site.register(models.WorkshopFeedBack, WorkshopFeedBackAdmin)
admin.site.register(models.WorkshopSections)
admin.site.register(models.WorkshopRatingValues)
admin.site.register(models.WorkshopVoting)
Loading