From 8ec0cae371a0b392b81bf34d5ee849c233ebbf65 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Tue, 13 Dec 2016 17:36:40 +0100 Subject: Rename schema.yaml to settings.yaml --- tests/data/simple/schema.yaml | 12 ------------ tests/data/simple/settings.yaml | 12 ++++++++++++ tests/data/wrong/schema.yaml | 12 ------------ tests/data/wrong/settings.yaml | 12 ++++++++++++ tests/test_collection.py | 10 +++++----- 5 files changed, 29 insertions(+), 29 deletions(-) delete mode 100644 tests/data/simple/schema.yaml create mode 100644 tests/data/simple/settings.yaml delete mode 100644 tests/data/wrong/schema.yaml create mode 100644 tests/data/wrong/settings.yaml (limited to 'tests') diff --git a/tests/data/simple/schema.yaml b/tests/data/simple/schema.yaml deleted file mode 100644 index 177aa92..0000000 --- a/tests/data/simple/schema.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: "Simple lesana collection" -lang: 'english' -fields: - - name: name - type: string - index: free - - name: description - type: text - index: free - - name: position - type: string - index: facet diff --git a/tests/data/simple/settings.yaml b/tests/data/simple/settings.yaml new file mode 100644 index 0000000..177aa92 --- /dev/null +++ b/tests/data/simple/settings.yaml @@ -0,0 +1,12 @@ +name: "Simple lesana collection" +lang: 'english' +fields: + - name: name + type: string + index: free + - name: description + type: text + index: free + - name: position + type: string + index: facet diff --git a/tests/data/wrong/schema.yaml b/tests/data/wrong/schema.yaml deleted file mode 100644 index 56031e4..0000000 --- a/tests/data/wrong/schema.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: "Lesana collection with certain errors" -lang: 'somethingish' -fields: - - name: name - type: string - index: free - - name: description - type: text - index: free - - name: position - type: string - index: facet diff --git a/tests/data/wrong/settings.yaml b/tests/data/wrong/settings.yaml new file mode 100644 index 0000000..56031e4 --- /dev/null +++ b/tests/data/wrong/settings.yaml @@ -0,0 +1,12 @@ +name: "Lesana collection with certain errors" +lang: 'somethingish' +fields: + - name: name + type: string + index: free + - name: description + type: text + index: free + - name: position + type: string + index: facet diff --git a/tests/test_collection.py b/tests/test_collection.py index b70c85f..be9a4e5 100644 --- a/tests/test_collection.py +++ b/tests/test_collection.py @@ -12,7 +12,7 @@ class testCollectionLoading(unittest.TestCase): def test_empty(self): self.collection = lesana.Collection('tests/data/empty') - self.assertEqual(self.collection.schema, {}) + self.assertEqual(self.collection.settings, {}) self.collection.update_cache() self.assertIsNotNone(self.collection.cache) @@ -20,9 +20,9 @@ class testCollectionLoading(unittest.TestCase): def test_simple(self): self.collection = lesana.Collection('tests/data/simple') - self.assertIsNotNone(self.collection.schema) - self.assertEqual(self.collection.schema['name'], "Simple lesana collection") - self.assertEqual(len(self.collection.schema['fields']), 3) + self.assertIsNotNone(self.collection.settings) + self.assertEqual(self.collection.settings['name'], "Simple lesana collection") + self.assertEqual(len(self.collection.settings['fields']), 3) self.collection.update_cache() self.assertIsNotNone(self.collection.cache) @@ -36,7 +36,7 @@ class testCollectionLoading(unittest.TestCase): self.assertIn("Invalid language", cm.output[0]) # The collection will default to english, but should still work. self.collection.update_cache() - self.assertIsNotNone(self.collection.schema) + self.assertIsNotNone(self.collection.settings) self.assertIsNotNone(self.collection.cache) self.assertIsNotNone(self.collection.stemmer) -- cgit v1.2.3