Timothy Hobbs
5e9fed2d46
Add failing test for #732
2019-03-09 00:00:32 +01:00
Garret Wassermann
37be1346cd
Merge pull request #729 from auto-mat/quoted-printable
...
Decode quoted-printable html bodies when getting email
2019-03-06 11:27:10 -05:00
Jachym Cepicky
57018e1aa0
adding tests
2019-03-06 15:03:47 +01:00
Timothy Hobbs
2c3ce8903f
Decode quoted-printable html bodies when getting email
...
Fixes #719
2019-03-06 14:21:30 +01:00
Garret Wassermann
4fb6c40c4e
Merge pull request #717 from OpenGeoLabs/time_tracking
...
Basic support for tracking time spent on tickets and follow-ups
2019-02-24 15:18:01 -05:00
Jachym Cepicky
4bd54e8bf3
adding tests
2019-02-24 20:46:48 +01:00
Garret Wassermann
a7505a1ecd
Merge pull request #720 from auto-mat/issue-700-fail
...
Add failing test case for issue-700 emails without bodies
2019-02-15 17:01:38 -05:00
Timothy Hobbs
4e35082475
Add failing test case for issue-700 emails without bodies
2019-02-15 15:11:06 +01:00
Jachym Cepicky
8cc0ca47f8
display list of queues only for users with right permissions
2019-02-05 15:44:06 +01:00
Garret Wassermann
43ed3ac773
PEP-8 fixes for mail threading merge
2018-12-28 11:32:49 -05:00
Garret Wassermann
5f0d22a692
Merge brunotikami/master for user and email threading, for #385 and #375
2018-12-28 10:53:28 -05:00
Garret Wassermann
696d10db12
Remove old python2/six code
2018-12-28 03:13:52 -05:00
Timothy Hobbs
9a45d28c95
More refactors of get_email.py
2018-10-31 16:30:19 +01:00
Timothy Hobbs
3f6ae1aefe
Transform UserSettings into a normal django model
2018-10-25 17:54:37 +02:00
Timothy Hobbs
c1750a7461
Require a secret key for viewing tickets unless HELPDESK_VIEW_A_TICKET_PUBLIC is set
...
Fixes #629 , #639
2018-09-08 21:29:59 +02:00
Timothy Hobbs
58cc18d049
Only staff users should be given access to the RSS feeds
2018-09-03 20:29:22 +02:00
Timothy Hobbs
13539e3056
Fix tests
2018-08-30 12:03:54 +02:00
Garret Wassermann
c70cf04e4d
Fix codestyle errors, use currying instead of lambdas for determing user access
2018-07-19 00:06:57 -04:00
Garret Wassermann
c71355cfdc
is_authenticated is a bool now not a function
2018-03-04 04:24:30 -05:00
Garret Wassermann
54a6b1d21b
Merge 0.2.7 bugfixes
2018-03-04 04:01:48 -05:00
Garret Wassermann
95ee61fe90
Fix PEP8 errors
2018-02-16 05:04:10 -05:00
Garret Wassermann
113880bc3a
Compare user IDs to determine if same user, and add simple test case, to fix #588
2018-02-16 05:00:22 -05:00
Garret Wassermann
75f54dd233
Testing quicktest.py
2018-01-11 02:19:49 -05:00
Garret Wassermann
31b49ab2f6
Merge branch 'master' into develop
2017-12-28 09:32:14 -05:00
Garret Wassermann
aa63e8f299
Really fix py 2 imp/importlib
2017-12-28 09:26:14 -05:00
Garret Wassermann
4b78704180
Fix error on python 2
2017-12-28 09:22:57 -05:00
Garret Wassermann
3ccd6c8dc8
Merge 0.2.6 Django 2.0 updates
2017-12-28 09:16:01 -05:00
Garret Wassermann
d18ce1f1d5
Bump version to 0.2.6 to fix remaining Django 2.0 warnings
2017-12-28 09:11:34 -05:00
Garret Wassermann
523329eab5
Merge 0.2.5 bugfixes and Django 2.0 changes
2017-12-28 07:43:10 -05:00
Garret Wassermann
5112f0dfd0
Address deprecation warnings to be compatible with Django 2.0
2017-12-28 07:23:51 -05:00
Garret Wassermann
92b43ef495
Merge master 0.2.3 bugfixes into develop
2017-12-09 23:02:12 -05:00
Garret Wassermann
dffab1bb6a
PEP8 fixes for test_get_email.py
2017-12-05 03:52:38 -05:00
Garret Wassermann
fca6b483f2
Add PGP signed email test case to get_email tests, for #567
2017-12-05 03:47:05 -05:00
Garret Wassermann
6e2a16e5a6
Fixing unit tests for python3 for custom staff filters
2017-10-30 05:07:44 -04:00
Garret Wassermann
3a1bd76e75
Merge custom staff filter, PR #239
2017-10-30 03:17:40 -04:00
Garret Wassermann
a0fb315c3b
Fix PEP8 errors
2017-07-30 20:33:25 -04:00
Garret Wassermann
c8ee3815ec
Fix num_to_link error, was leaving off a letter of text if next to the ID, to address #511
2017-07-16 19:58:11 -04:00
Garret Wassermann
9fd170f707
Add test for num_to_link function
2017-07-16 19:53:05 -04:00
Garret Wassermann
d13e87bd3b
Last PEP-8 fix?
2017-04-20 02:54:35 -04:00
Garret Wassermann
45c457ead2
More PEP-8 fixes on test_get_email
2017-04-20 02:49:06 -04:00
Garret Wassermann
47f3eb8e89
PEP-8 fixes
2017-04-20 02:44:12 -04:00
Garret Wassermann
bf344b09b1
Check CC'd email against list of User emails, and add the User to the ticket if necessary and not already the assignee, etc.
2017-04-20 02:36:10 -04:00
Garret Wassermann
8963fa694a
Prevent adding Users or Queue email to the CC list
2017-04-19 23:47:58 -04:00
Garret Wassermann
220c0460e1
Check number of CCs to ensure no duplicates made it through
2017-04-19 00:04:16 -04:00
Garret Wassermann
34ce553435
Only add CC emails to Ticket if they were not already included (no duplicates), add testing for it
2017-04-18 23:36:39 -04:00
Garret Wassermann
3b22bb655a
PEP8 fixes for too many blank lines
2017-04-16 05:14:30 -04:00
Garret Wassermann
e3a378625c
Add test with django template tag in email body, to ensure we test for and fix #72 in future changes
2017-04-16 05:10:51 -04:00
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