Exemple #1
0
 def test_get_data_id_with_empty_subpath(self):
     maturity = Maturity(id='2')
     spec = Specification(id='22', maturity='2', mdn_key='SPEC')
     section = Section(id='_sec', specification='22', subpath={})
     collection = Collection()
     collection.add(maturity)
     collection.add(spec)
     collection.add(section)
     self.assertEqual(('sections', 'SPEC', ''), section.get_data_id())
 def test_get_data_id_without_subpath(self):
     maturity = Maturity(id='2')
     spec = Specification(id='22', maturity='2', mdn_key='SPEC')
     section = Section(id='_sec', specification='22')
     collection = Collection()
     collection.add(maturity)
     collection.add(spec)
     collection.add(section)
     self.assertEqual(('sections', 'SPEC', ''), section.get_data_id())
 def test_get_data_id_without_subpath(self):
     maturity = Maturity(id="2")
     spec = Specification(id="22", maturity="2", mdn_key="SPEC")
     feature = Feature(id="222")
     section = Section(id="_sec", specification="22", features=["222"])
     collection = Collection()
     collection.add(maturity)
     collection.add(spec)
     collection.add(feature)
     collection.add(section)
     self.assertEqual(('sections', 'SPEC', ''), section.get_data_id())
 def test_get_data_id_with_number(self):
     maturity = Maturity(id='2')
     spec = Specification(id='22', maturity='2', mdn_key='SPEC')
     section = Section(
         id='_sec', specification='22',
         number={'en': '1.2.3'}, subpath={'en': '#123'})
     collection = Collection()
     collection.add(maturity)
     collection.add(spec)
     collection.add(section)
     self.assertEqual(('sections', 'SPEC', '#123'), section.get_data_id())
 def test_get_data_id_without_subpath(self):
     maturity = Maturity(id="2")
     spec = Specification(id="22", maturity="2", mdn_key="SPEC")
     feature = Feature(id="222")
     section = Section(id="_sec", specification="22", features=["222"])
     collection = Collection()
     collection.add(maturity)
     collection.add(spec)
     collection.add(feature)
     collection.add(section)
     self.assertEqual(('sections', 'SPEC', ''), section.get_data_id())
Exemple #6
0
 def test_get_data_id_with_number(self):
     maturity = Maturity(id='2')
     spec = Specification(id='22', maturity='2', mdn_key='SPEC')
     section = Section(id='_sec',
                       specification='22',
                       number={'en': '1.2.3'},
                       subpath={'en': '#123'})
     collection = Collection()
     collection.add(maturity)
     collection.add(spec)
     collection.add(section)
     self.assertEqual(('sections', 'SPEC', '#123'), section.get_data_id())
 def test_get_data_id_with_number(self):
     maturity = Maturity(id="2")
     spec = Specification(id="22", maturity="2", mdn_key="SPEC")
     feature = Feature(id="222")
     section = Section(
         id="_sec", specification="22", features=["222"],
         number={"en": "1.2.3"}, subpath={"en": "#123"})
     collection = Collection()
     collection.add(maturity)
     collection.add(spec)
     collection.add(feature)
     collection.add(section)
     self.assertEqual(('sections', 'SPEC', '#123'), section.get_data_id())
 def test_get_data_id_with_number(self):
     maturity = Maturity(id="2")
     spec = Specification(id="22", maturity="2", mdn_key="SPEC")
     feature = Feature(id="222")
     section = Section(
         id="_sec", specification="22", features=["222"],
         number={"en": "1.2.3"}, subpath={"en": "#123"})
     collection = Collection()
     collection.add(maturity)
     collection.add(spec)
     collection.add(feature)
     collection.add(section)
     self.assertEqual(('sections', 'SPEC', '#123'), section.get_data_id())