mirror of
https://github.com/beetbox/beets.git
synced 2026-01-09 01:15:38 +01:00
Fixed styling and test to pass cli
This commit is contained in:
parent
a9440ada2b
commit
07138f86dc
2 changed files with 6 additions and 10 deletions
|
|
@ -39,8 +39,7 @@ The ``export`` command has these command-line options:
|
|||
|
||||
* ``--append``: Appends the data to the file instead of writing.
|
||||
|
||||
* ``--format`` or ``-f``: Specifies the format the data will be exported as. If not informed, JSON will be used by default.
|
||||
The format options include csv, json and xml.
|
||||
* ``--format`` or ``-f``: Specifies the format the data will be exported as. If not informed, JSON will be used by default. The format options include csv, json and xml.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
|
@ -90,4 +89,4 @@ The default options look like this::
|
|||
formatting:
|
||||
encoding: 'unicode'
|
||||
xml_declaration: True
|
||||
method: 'xml'
|
||||
method: 'xml'
|
||||
|
|
|
|||
|
|
@ -21,12 +21,9 @@ from __future__ import division, absolute_import, print_function
|
|||
import unittest
|
||||
from test.helper import TestHelper
|
||||
import re
|
||||
import beets
|
||||
import beets.plugins
|
||||
|
||||
|
||||
class ExportPluginTest(unittest.TestCase, TestHelper):
|
||||
|
||||
def setUp(self):
|
||||
self.setup_beets()
|
||||
self.load_plugins('export')
|
||||
|
|
@ -61,7 +58,7 @@ class ExportPluginTest(unittest.TestCase, TestHelper):
|
|||
artist=item1.artist
|
||||
)
|
||||
for key, val in self.test_values.items():
|
||||
self.check_assertIn(
|
||||
self.check_assertin(
|
||||
actual=actual,
|
||||
str_format='"{0}":"{1}"',
|
||||
key=key,
|
||||
|
|
@ -75,7 +72,7 @@ class ExportPluginTest(unittest.TestCase, TestHelper):
|
|||
artist=item1.artist
|
||||
)
|
||||
for key, val in self.test_values.items():
|
||||
self.check_assertIn(
|
||||
self.check_assertin(
|
||||
actual=actual,
|
||||
str_format='{0}{1}',
|
||||
key='',
|
||||
|
|
@ -89,14 +86,14 @@ class ExportPluginTest(unittest.TestCase, TestHelper):
|
|||
artist=item1.artist
|
||||
)
|
||||
for key, val in self.test_values.items():
|
||||
self.check_assertIn(
|
||||
self.check_assertin(
|
||||
actual=actual,
|
||||
str_format='<{0}>{1}</{0}>',
|
||||
key=key,
|
||||
val=val
|
||||
)
|
||||
|
||||
def check_assertIn(self, actual, str_format, key, val):
|
||||
def check_assertin(self, actual, str_format, key, val):
|
||||
expected = str_format.format(key, val)
|
||||
self.assertIn(
|
||||
expected,
|
||||
|
|
|
|||
Loading…
Reference in a new issue