From 888655413da06dad9e09cb35f3d441da9252d5a3 Mon Sep 17 00:00:00 2001
From: Peter Kessen
Date: Sun, 20 Sep 2015 12:54:46 +0200
Subject: [PATCH] added testcase for fields command
first check of function without check of consistent output
---
test/test_ui_commands.py | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/test/test_ui_commands.py b/test/test_ui_commands.py
index 08f44eb57..60e06a1e1 100644
--- a/test/test_ui_commands.py
+++ b/test/test_ui_commands.py
@@ -84,6 +84,25 @@ class QueryTest(_common.TestCase):
self.check_do_query(0, 2, album=True, also_items=False)
+class FieldsTest(_common.TestCase):
+ def setUp(self):
+ super(FieldsTest, self).setUp()
+
+ self.io.install()
+
+ self.libdir = os.path.join(self.temp_dir, 'testlibdir')
+ os.mkdir(self.libdir)
+
+ # Add a file to the library but don't copy it in yet.
+ self.lib = library.Library(':memory:', self.libdir)
+
+ def tearDown(self):
+ self.io.restore()
+
+ def test_fields_func(self):
+ commands.fields_func(self.lib, [], [])
+
+
def suite():
return unittest.TestLoader().loadTestsFromName(__name__)