Garret Wassermann
7b8426596f
Separate out the CC test from plain test so we're testing both possibilities (with and without a CC)
2017-04-16 04:51:46 -04:00
Garret Wassermann
b2ac1fd3a5
#95 : save CC'd emails on a comment to the Ticket for future correspondence, set to view only initially, and update tests for CC
2017-04-16 04:19:17 -04:00
Garret Wassermann
5ec985af9b
Add explicit encoding hint to top of file to allow Python 2 to read file with Unicode characters, in accordance with PEP-263
2017-04-03 02:34:54 -04:00
Garret Wassermann
0fb9094d01
Remove line for PEP8
2017-04-03 02:29:28 -04:00
Garret Wassermann
f43ef69ec1
Add a MIME multipart email test for get_email
2017-04-03 02:19:29 -04:00
Garret Wassermann
74a7afadb9
Update get_email test to use unicode characters; seem to have found an encoding errory in get_email, provided a fix that satisfies test
2017-04-03 01:53:25 -04:00
Garret Wassermann
6fec1015c3
Work in progress on unicode chars
2017-02-15 18:51:20 -05:00
Alex Seeholzer
a2315eb0c4
added pep8 fix and missing migration
2017-01-13 17:39:56 +01:00
Alex Seeholzer
645f196848
Added tests covering the usersettings_helpdesk occurrences
2017-01-13 17:37:10 +01:00
Jonathan Barratt
5acd891c68
refactor all handling of attached files
...
Extract attachment processing from forms, views.staff, and management.command.get_email modules, and consolidate it into a unified lib module function.
Also refactor the affected components, most notably lib.send_templated_email, to make it easier (IMO) to reason about changes to them.
Add unit tests for attachments with UTF-8 filenames, and functional tests for submission of same, as well as ASCII versions, through the public ticket-form.
Remove unused Attachment method "get_upload_to".
2016-12-08 19:47:20 +07:00
Jonathan Barratt
391e35065c
per code review, update safe IP addr/port constants, remove commented-out code, and add comments to unexplained code
2016-12-06 09:55:22 +07:00
Jonathan Barratt
e8d0c5b2c7
implement mocked pop3 and imap tests for get_email
...
also update travis to latest django patch releases
2016-12-02 19:04:52 +07:00
Alex Seeholzer
399b0901f6
newer version of tests
2016-12-02 17:40:46 +07:00
Alex Seeholzer
72a99cc99a
Moved existing test for local mailbox into generation of tests for matrix of email configurations;
2016-12-02 17:40:46 +07:00
Garret Wassermann
c74208325b
Removed test_per_queue_staff_permission assertion, report_index no longer returns unassigned_tickets
2016-10-31 02:06:49 -04:00
Garret Wassermann
adf2b16c2c
Fix namespaces in test
2016-10-29 04:33:27 -04:00
Garret Wassermann
1f1d477a35
Sync again with master 0.2
2016-10-29 04:11:41 -04:00
Garret Wassermann
d791700582
Fix PEP8 errors
2016-10-29 04:08:57 -04:00
Jonathan Barratt
28308d19fb
cleanup build-breaking whitespace merge errors
2016-10-29 14:59:14 +07:00
Garret Wassermann
cad174468b
Sync with namespace and other v0.2 changes
2016-10-29 03:47:15 -04:00
Jonathan Barratt
43c067dd4f
merge changes from updated master
2016-10-29 13:35:03 +07:00
Alex Barcelo
89a6ae01b8
Fixing style (according to branch 'autocodestyle') + quicktest
2016-10-24 08:04:31 +02:00
Alex Barcelo
179ceb2f82
fixing style on tests
2016-10-23 22:10:32 +02:00
Alex Barcelo
24d88be8d9
Initial general clean-up of stuff
2016-10-21 17:14:12 +02:00
Garret Wassermann
d7875587b7
Revert previous change
2016-10-20 12:05:28 -04:00
Garret Wassermann
884662dd21
Ensure binary data is returns so Django can decode it
2016-10-20 11:46:09 -04:00
Garret Wassermann
dfb7987ebb
Remove emails from queue in test_get_email
2016-10-20 11:17:51 -04:00
Garret Wassermann
197fad99d2
Remove mail templates since we're not testing them here; might be good to include a test for this elsewhere
2016-10-20 02:48:14 -04:00
Garret Wassermann
5e93297787
Fix call_command options for correct format to work with Django 1.7+
2016-10-20 02:29:23 -04:00
Garret Wassermann
6418194b85
Fix command line arg for Django 1.7 and make Python 2 and 3 compatible test
2016-10-20 02:21:43 -04:00
Garret Wassermann
9606201200
Fix mock tests for get_email (hopefully for good this time)
2016-10-20 02:09:05 -04:00
Garret Wassermann
b7ef83f7d2
Check that folder is a dir before checking for mail using get_email; fix unit test for --quiet
2016-10-20 01:39:24 -04:00
Garret Wassermann
e3c9e04feb
Fix python module naming in get_email test
2016-10-20 01:25:16 -04:00
Garret Wassermann
c9c7642724
New unit test for get_email command
2016-10-19 21:37:23 -04:00
Alex Barcelo
91afbb9755
fixing some additional reverse stuff
2016-10-19 15:30:37 +02:00
Alex Barcelo
afd6ebad74
Merge current 'master' state into urls_app_name
2016-10-19 15:26:04 +02:00
Garret Wassermann
bf55ab7f8c
Oops, forgot to change one more URL from dashboard to report_index
2016-09-13 00:13:52 -04:00
Garret Wassermann
fe54d81022
Update unit test for backend changes to dashboard and statistics pages
2016-09-13 00:06:38 -04:00
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
Bruno Tikami
c5101a2873
UP: When multiple emails are used on the "To" field, subscribe them as well.
2016-03-23 13:16:49 -03:00
Bruno Tikami
978e6d5c9b
UPDATED: When notifying users about creation / updates on tickets, notify everybody using a single email message.
2016-03-17 01:12:42 -03:00
Bruno Tikami
4124677f10
ADDED: Test cases for the new enable_notifications_on_email_events flag
2016-03-03 13:47:15 -03:00
Bruno Tikami
26fc6cb1de
ADDED: Flag to enable notifications on every interaction that occurs over email.
2016-03-01 16:49:34 -03:00
Bruno Tikami
1511e0e72c
UPDATED: Better separation of HTTP and e-mail test cases
2016-02-28 15:19:08 -03:00
Bruno Tikami
45fbd605e5
UPDATED: Separate HTTP and e-mail TestCases
2016-02-28 15:00:15 -03:00
Bruno Tikami
b55eaabebd
UPDATED: Renaming methods after reading through the pull request
2016-02-22 10:17:28 -03:00
Bruno Tikami
5ed6e8c2ce
BUGFIX: assert statements against email count were doing the wrong math. Also, trying to explain get easier to understand comments
2016-02-20 12:38:06 -02:00
Bruno Tikami
6d890509a3
ADDED: docstrings
2016-02-19 12:40:18 -02:00
Bruno Tikami
99bfc340f9
ADDED: <tests.test_ticket_submission.test_create_ticket_from_email_without_message_id>
2016-02-17 21:43:33 -02:00
Bruno Tikami
be07fdff6c
UPDATED: Finished moving Message-Id field from <Ticket> to <FollowUp> model.
2016-02-16 17:10:13 -02:00
Bruno Tikami
5b46602b29
UPDATED: <helpdesk.tests.test_ticket_submission.test_create_ticket_instance_from_payload> now calls the right callable to ensure the message is parsed and the Ticket instance is created.
2016-02-15 16:15:46 -02:00
Bruno Tikami
cea4cb2c6a
UPDATED: Set "submitter_email_id" as the standard to reference the Message-Id email field.
2016-02-07 18:11:49 -02:00
Bruno Tikami
ff0ceefab4
ADDED: <tests.test_ticket_submisssion.test_create_ticket_from_email_with_message_id> to ensure that the RFC 2822 field "message-id" is stored on the <Ticket.submitter_email_id> field. Backwards-compatible test kept.
2016-02-07 16:54:05 -02:00
Bruno Tikami
703c0e3b66
ADDED: <tests.test_ticket_submission.test_create_ticket_from_email_with_carbon_copy> and <tests.test_ticket_submission.test_create_ticket_from_email_with_invalid_carbon_copy> to ensure <TicketCC> instances are created by the <Ticket> model when the respective RFC 2822 field is provided.
2016-02-07 15:50:03 -02:00
Bruno Tikami
4d00dd3d6e
UPDATED: Renamed test <tests.test_ticket_submission.test_create_ticket_direct> to <tests.test_ticket_submission.test_create_ticket_from_email> so the new upcoming test names (including CC, In-Reply etc) are easier to understand.
2016-02-07 12:06:07 -02: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
4ed8f11754
merge HELPDESK_CUSTOM_STAFF_FILTER_CALLBACK into HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE
2014-08-01 07:20:43 +02:00
Stefano Brentegani
14d7279844
test non-public update by non-staff user is blocked
2014-07-30 06:55:43 +02:00
Stefano Brentegani
c0dd6ea075
test helpdesk.views.staff.return_to_ticket
2014-07-30 06:07:08 +02:00
Stefano Brentegani
ccec263452
Also test is_helpdesk_staff
2014-07-29 22:41:09 +02:00
Stefano Brentegani
82df965d5f
replace HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE in homepage view and test behaviour
2014-07-29 22:03:47 +02:00
Stefano Brentegani
581e43a3b0
separate authorisation function from decorator
2014-07-29 20:55:25 +02:00
Stefano Brentegani
aea940cb3f
move decorators to their own module, rename to helpdesk_*
2014-07-28 11:46:02 +02:00
Stefano Brentegani
97c317f83d
add tests, example
2014-07-28 06:47:19 +02: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