Beispiel #1
0
 def test_Provides_json(self):
     from niprov.formatfactory import FormatFactory
     from niprov.formatjson import JsonFormat
     factory = FormatFactory()
     self.assertIsInstance(factory.create('json'), JsonFormat)
Beispiel #2
0
 def test_Provides_picture(self):
     from niprov.formatfactory import FormatFactory
     from niprov.pictures import PictureCache
     factory = FormatFactory()
     self.assertIsInstance(factory.create('picture'), PictureCache)
Beispiel #3
0
 def test_Raises_exception_on_unknown_name(self):
     from niprov.formatfactory import FormatFactory
     factory = FormatFactory()
     with self.assertRaisesRegexp(ValueError, 'Unknown format: hexameter'):
         factory.create('hexameter')
Beispiel #4
0
 def test_Provides_dict(self):
     from niprov.formatfactory import FormatFactory
     from niprov.formatdict import DictFormat
     factory = FormatFactory()
     self.assertIsInstance(factory.create('dict'), DictFormat)
Beispiel #5
0
 def test_Provides_object(self):
     from niprov.formatfactory import FormatFactory
     from niprov.formatobject import ObjectFormat
     factory = FormatFactory()
     self.assertIsInstance(factory.create('object'), ObjectFormat)
Beispiel #6
0
 def test_Provides_narrated(self):
     from niprov.formatfactory import FormatFactory
     from niprov.formatnarrated import NarratedFormat
     factory = FormatFactory()
     self.assertIsInstance(factory.create('narrated'), NarratedFormat)
Beispiel #7
0
 def test_Provides_simple(self):
     from niprov.formatfactory import FormatFactory
     from niprov.formatsimple import SimpleFormat
     factory = FormatFactory()
     self.assertIsInstance(factory.create('simple'), SimpleFormat)
Beispiel #8
0
 def test_Provides_json(self):
     from niprov.formatfactory import FormatFactory
     from niprov.formatjson import JsonFormat
     factory = FormatFactory()
     self.assertIsInstance(factory.create('json'), JsonFormat)
Beispiel #9
0
 def test_Provides_xml(self):
     from niprov.formatfactory import FormatFactory
     from niprov.formatxml import XmlFormat
     factory = FormatFactory()
     self.assertIsInstance(factory.create('xml'), XmlFormat)
Beispiel #10
0
 def test_Provides_picture(self):
     from niprov.formatfactory import FormatFactory
     from niprov.pictures import PictureCache
     factory = FormatFactory()
     self.assertIsInstance(factory.create('picture'), PictureCache)
Beispiel #11
0
 def test_Raises_exception_on_unknown_name(self):
     from niprov.formatfactory import FormatFactory
     factory = FormatFactory()
     with self.assertRaisesRegexp(ValueError, 'Unknown format: hexameter'):
        factory.create('hexameter')
Beispiel #12
0
 def test_Provides_object(self):
     from niprov.formatfactory import FormatFactory
     from niprov.formatobject import ObjectFormat
     factory = FormatFactory()
     self.assertIsInstance(factory.create('object'), ObjectFormat)
Beispiel #13
0
 def test_Provides_dict(self):
     from niprov.formatfactory import FormatFactory
     from niprov.formatdict import DictFormat
     factory = FormatFactory()
     self.assertIsInstance(factory.create('dict'), DictFormat)
Beispiel #14
0
 def test_Provides_simple(self):
     from niprov.formatfactory import FormatFactory
     from niprov.formatsimple import SimpleFormat
     factory = FormatFactory()
     self.assertIsInstance(factory.create('simple'), SimpleFormat)
Beispiel #15
0
 def test_Provides_narrated(self):
     from niprov.formatfactory import FormatFactory
     from niprov.formatnarrated import NarratedFormat
     factory = FormatFactory()
     self.assertIsInstance(factory.create('narrated'), NarratedFormat)
Beispiel #16
0
 def test_Provides_xml(self):
     from niprov.formatfactory import FormatFactory
     from niprov.formatxml import XmlFormat
     factory = FormatFactory()
     self.assertIsInstance(factory.create('xml'), XmlFormat)