diff --git a/dpaste/tests/test_highlight.py b/dpaste/tests/test_highlight.py index 2dbc627..844b5cd 100644 --- a/dpaste/tests/test_highlight.py +++ b/dpaste/tests/test_highlight.py @@ -13,7 +13,7 @@ class HighlightAPITestCase(TestCase): PLAIN_CODE is not run through Pygments, test it separately. """ input = 'var' - expected = 'var' + expected = 'var' value = pygmentize(input, lexer_name=PLAIN_CODE) self.assertEqual(value, expected) @@ -22,7 +22,7 @@ class HighlightAPITestCase(TestCase): Whitespace on the first line is retained. """ input = ' var=1' - expected = ' var=1' + expected = ' var=1' value = pygmentize(input, lexer_name=PLAIN_CODE) self.assertEqual(value, expected) @@ -35,10 +35,10 @@ class HighlightAPITestCase(TestCase): ' var=3\n' ' var=4') expected = ( - ' var=1\n' - ' var=2\n' - ' var=3\n' - ' var=4') + ' var=1\n' + ' var=2\n' + ' var=3\n' + ' var=4') value = pygmentize(input, lexer_name=PLAIN_CODE) self.assertEqual(value, expected) diff --git a/dpaste/views.py b/dpaste/views.py index 2c2cf12..3747423 100644 --- a/dpaste/views.py +++ b/dpaste/views.py @@ -285,7 +285,7 @@ class APIView(View): # We need at least a lexer or a filename if not lexer and not filename: return HttpResponseBadRequest('No lexer or filename given. Unable to ' - 'determine a highlight. Valid lexers are: %s' % ', '.join(highlight.LEXER_LIST)) + 'determine a highlight. Valid lexers are: %s' % ', '.join(highlight.LEXER_KEYS)) # A lexer is given, check if its valid at all if lexer and lexer not in highlight.LEXER_KEYS: