summaryrefslogtreecommitdiff
path: root/morphlib/source_tests.py
diff options
context:
space:
mode:
authorAdam Coldrick <adam.coldrick@codethink.co.uk>2014-08-14 13:45:59 +0000
committerAdam Coldrick <adam.coldrick@codethink.co.uk>2014-08-14 13:45:59 +0000
commitc1c331e7c545c7a2f0545d3b1ef9751c9571d357 (patch)
treed2a4edf71f2c7204808e4543f3d743a81e95a1bd /morphlib/source_tests.py
parentb2786c73c0f4d4b76f824e309598ce57065e30ab (diff)
parent5f705f1e2c95b988ae39df7820f4034c49f375e4 (diff)
downloadmorph-c1c331e7c545c7a2f0545d3b1ef9751c9571d357.tar.gz
Merge branch 'baserock/adamcoldrick/remove-morph2-tweaked'
Reviewed-by: Richard Maw
Diffstat (limited to 'morphlib/source_tests.py')
-rw-r--r--morphlib/source_tests.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/morphlib/source_tests.py b/morphlib/source_tests.py
index 6643f0fc..f5ce5d4d 100644
--- a/morphlib/source_tests.py
+++ b/morphlib/source_tests.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2012 Codethink Limited
+# Copyright (C) 2012-2014 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,10 +22,8 @@ import morphlib
class SourceTests(unittest.TestCase):
morphology_text = '''
- {
- "name": "foo",
- "kind": "chunk"
- }
+ name: foo
+ kind: chunk
'''
def setUp(self):
@@ -33,7 +31,8 @@ class SourceTests(unittest.TestCase):
self.original_ref = 'original/ref'
self.sha1 = 'CAFEF00D'
self.tree = 'F000000D'
- self.morphology = morphlib.morph2.Morphology(self.morphology_text)
+ loader = morphlib.morphloader.MorphologyLoader()
+ self.morphology = loader.load_from_string(self.morphology_text)
self.filename = 'foo.morph'
self.source = morphlib.source.Source(
self.repo_name, self.original_ref, self.sha1, self.tree,