configurationengine/source/plugins/symbian/ConeCRMLPlugin/CRMLPlugin/tests/unittest_crml_writer.py
equal
deleted
inserted
replaced
13 # |
13 # |
14 # Description: |
14 # Description: |
15 # |
15 # |
16 |
16 |
17 import sys, os, unittest, logging |
17 import sys, os, unittest, logging |
18 import __init__ |
|
19 |
18 |
20 ROOT_PATH = os.path.dirname(os.path.abspath(__file__)) |
19 ROOT_PATH = os.path.dirname(os.path.abspath(__file__)) |
21 |
20 |
22 from cone.public import exceptions, plugin, api, container |
21 from cone.public import exceptions, plugin, api, container |
23 |
22 |
64 dview.get_feature = lambda ref: MockFeature(ref) |
63 dview.get_feature = lambda ref: MockFeature(ref) |
65 return dview |
64 return dview |
66 |
65 |
67 class TestCrmlTxtWriter(unittest.TestCase): |
66 class TestCrmlTxtWriter(unittest.TestCase): |
68 def setUp(self): |
67 def setUp(self): |
69 self.writer = CrmlTxtWriter(MockConfiguration(), log) |
68 self.context = plugin.GenerationContext(configuration=MockConfiguration()) |
|
69 self.writer = CrmlTxtWriter(self.context, log) |
70 |
70 |
71 def test_write_access(self): |
71 def test_write_access(self): |
72 def check(acc, expected): |
72 def check(acc, expected): |
73 actual = self.writer.get_access_line(acc) |
73 actual = self.writer.get_access_line(acc) |
74 self.assertEquals(expected, actual) |
74 self.assertEquals(expected, actual) |