Commit graph

23 commits

Author SHA1 Message Date
Adrian Sampson
8eb50fee33 Avoid weird mutation in web tests
This was strange and unnecessary---setting a field on the response
object instead of just using a local variable---and also broke on Flask
1.0.
2018-04-27 17:34:18 -04:00
Steve Johnson
e3707e45f3 Maybe fix code and tests for Windows 2017-01-15 11:21:59 -08:00
Steve Johnson
6b7a6baaf2 Add test for /item/path/ endpoint 2017-01-15 11:21:59 -08:00
Steve Johnson
05bc4996a8 Rename and invert new config option 2017-01-15 11:21:33 -08:00
Steve Johnson
cedd93b778 Add tests for exclude_paths_from_items 2017-01-15 11:21:33 -08:00
Adrian Sampson
a88682e7bb Undo from _common import unittest indirection
This was a vestige from when we used to need the unittest2 library for pre-2.7
compatibility. Now that we require Python 2.7, we aren't using that library
and this indirection wasn't doing any good.
2016-11-26 18:46:44 -05:00
Adrian Sampson
5665696b87 Remove unnecessary path fiddling
I don't know why this was here in the first place -- imports from `beetsplug`
should work fine without this mess.
2016-07-25 15:08:36 -04:00
Johnny Robeson
7b66dfec4b use renamed test assertions from six 2016-06-23 04:40:18 -04:00
Johnny Robeson
9b8913abdf explicitly decode json responses in web tests 2016-06-10 03:29:51 -04:00
Adrian Sampson
71b9fd785c Revert "Do __name__ comparison with bytes and not unicode"
This reverts commit 9c41c39913.
That commit used byte strings for the `if __name__ == '__main__'` pattern,
which was necessary when we were doing unicode_literals. But it is wrong on
Python 3, and now that we're liberated from unicode_literals, we need to go
back to native strings for this comparison.
2016-05-29 19:19:59 -07:00
Adrian Sampson
e54c7eec3d Standardize __future__ imports without parentheses
Since the list is short enough now, we don't need parentheses for the line
wrap. This is a little less ugly.
2016-02-28 15:03:51 -08:00
Peter Kessen
5abe1fdd9b Removed unicode_literals from test_web 2016-02-23 07:34:44 +01:00
Peter Kessen
6b408507f6 added encoding as comment in files
added line like
# -*- coding: utf-8 -*-
to all files without license
2015-11-19 18:52:57 +01:00
Adrian Sampson
e7f8a627e9 Style fixes for pep8 1.6 2015-02-07 12:51:54 -08:00
Bruno Cauet
53c21330c2 All tests use unicode_literals 2015-01-20 15:58:02 +01:00
Bruno Cauet
9c41c39913 Do __name__ comparison with bytes and not unicode 2015-01-20 12:03:57 +01:00
Bruno Cauet
90b388b775 Use __future__ imports but unicode_literals everywhere
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.

Goal is smoothing the transition to python 3.
2015-01-19 12:25:16 +01:00
Bruno Cauet
2902cda036 tests: use absolute imports everywhere 2015-01-19 12:25:15 +01:00
Thomas Scholtes
98ae8cbbc9 Make tests conform to PEP8 2014-09-09 22:31:46 +02:00
Thomas Scholtes
dcbf7ecc36 Fix album retrieval 2014-02-10 17:26:26 +01:00
Thomas Scholtes
75c3b82d88 Test and fix web /item/query/<query> 2014-02-02 19:12:10 +01:00
Thomas Scholtes
f706e58409 Web API handles multiple ids 2014-02-02 19:04:04 +01:00
Thomas Scholtes
83e86241b8 Add JSON-API tests 2014-01-21 22:39:48 +01:00