Commit Graph

75 Commits

Author SHA1 Message Date
Ross Poulton
03b3a70975 Merge pull request #410 from mrkiwi-nz/fix_savequery
Fix savequery
2016-06-30 10:36:41 +10:00
Daryl
44bbcd31e5 Bug in test_per_queue_staff_permission.py
Using the django auth backend allows integers to be passed as a password
Using Peter Sagerson's ldap auth backend there is an error thrown because
some code tries to do a len() on the password.
You could argue that the ldap auth backend should str(password), but
you could also argue that passing an int as a password is bad practice

This PR ensures that a string is sent to the auth module.
2016-06-30 12:07:33 +12:00
Daryl
0ac7183875 Add test for saving a query, fix shared checkbox issue
My browser sends 'on' when a checkbox is ticked, django ORM only
recognises '1', 'true' or 't' as valid 'True' responses.
This throws an error
ValidationError at /helpdesk/save_query/
[u"'on' value must be either True or False."]

This could be fixed with " value='1'" in the template, but testing that is harder
My fix is to add a check in the view. 2 more lines, but easier to unittest.
Core devs need to make a call as to which solution is best.

D
2016-06-30 11:36:21 +12:00
Daryl
e5a6686c6d Ticket #403 - This code changes the behaviour of lookups for tickets and
ignores the queue name. This means that queue changes on a ticket dont
break the email links which have already been sent out.
The queue name still exists in the link/url, but is not used in the
lookup
2016-06-24 13:46:37 +12:00
Alex Barcelo
a741395ce5 chaging tests to aknowledge helpdesk namespace 2015-12-22 11:20:52 +01:00
Alex Barcelo
3a0f08046e using helpdesk app_name and droping helpdesk_ prefix 2015-12-22 10:27:03 +01:00
Alex Barcelo
fb66fea86e change basic features of membership into permissions 2015-12-16 22:27:05 +01:00
Ross Poulton
6187b0568c Merge pull request #358 from flinz/django-1.9-fixes
Django 1.9 compatibility
2015-12-16 10:24:16 +11:00
Alex Seeholzer
8390125c01 fixes of python 3 test fails 2015-11-18 15:07:33 +01:00
Alex Seeholzer
71504aa85d minor changes for python3 2015-11-18 10:41:02 +01:00
Alex Seeholzer
f7f0882f86 Merge branch 'master-upstream' into django-1.9-fixes
* master-upstream:
  Fix QueueMembership bug revealed by django.test's DiscoverRunner
2015-11-18 10:16:33 +01:00
Alex Seeholzer
307e9446a2 ensure tests for ticket submission run correctly in django 1.9 (URI's no longer include the scheme and domain part of the URLs) 2015-11-16 16:08:52 +01:00
Jonathan Barratt
0610a6645d Fix QueueMembership bug revealed by django.test's DiscoverRunner
If HELPDESK_ENABLE_PER_QUEUE_STAFF_MEMBERSHIP was True but a user had
no QueueMembership entries, then restricting queue access generated
RelatedObjectDoesNotExist exceptions.

 - Ask for forgiveness whenever we try to limit a queryset by the
queuemembership related object set.

 - Since tests can now be run with the project's settings active,
rather than only with quicktest.py's settings, restore the initial
HELPDESK_ENABLE_PER_QUEUE_MEMBERSHIP value after having tested the
related functionality.
2015-11-16 18:45:27 +07:00
Alex Seeholzer
cd0daccb56 tests are correctly discovered for django < 1.6 2015-11-13 15:35:36 +01:00
Alex Seeholzer
50877c3708 Trying to fix travis build error & more general test imports: all files with test_*.py are imported from the /tests directory; 2015-11-13 14:07:36 +01:00
Scott Sadler
2681f6340c fix reload_urlconf test helper so it supports a third party urlconf 2015-11-06 15:22:44 +01:00
Scott Sadler
e82c17567a Merge branch 'master' into django-1.8
Conflicts:
	helpdesk/tests/__init__.py
2015-11-06 14:50:33 +01:00
Alex Seeholzer
f9682ccf37 renamed test __init__.py imports to new test naming scheme 2015-06-12 15:52:35 +02:00
Alex Seeholzer
da30d2b973 tests renamed for compliance 2015-06-12 15:48:38 +02:00
Jonathan Barratt
bfcd8fc024 Add ability to restrict users' access by queue if so configured, and migration and tests for same. 2015-06-12 12:23:39 +07:00
Simon Thépot
83affccec5 Specify features to load in failing testcase for django < 1.7 2015-01-14 16:00:35 +01:00
Tom Graham
d2ac8af6c0 Improved support for custom user models
Support for custom user models with a non-standard username field
2014-10-22 16:18:04 +11:00
Stefano Brentegani
fe5c7135a6 exclude KB from navigation if HELPDESK_KB_ENABLED is False (fixes #223) 2014-07-21 18:44:54 +02:00
Ross Poulton
11aeee8ad5 Improve public action tests 2012-08-08 14:32:17 +10:00
Ross Poulton
26e0809e5e Add some tests. Finally. First draft: just includes submission & public
action testing - needs plenty more tests added.
2012-08-08 00:04:34 +10:00