def test_ViewCreation(self):
     for entries in self.entity:
         createView(entries, getViewCode(entries), getUserProfile(26))
     self.assertTrue(len(Prototype.objects.all()) > 0)
 def test_viewtitle_specified(self):
     titleString = 'viewTitleViewTest'
     for entries in self.entity:
         returnValue = getViewCode(entries, titleString)
         self.assertEqual(slugify2(entries.model.code + '-' + titleString), returnValue)
 def test_GetViewCode_with_viewtitle_not_none(self):
     viewTitle = random_string_generator(5)
     viewCode = getViewCode(self.pEntity, viewTitle)
     self.assertEqual(viewCode, slugify(self.pEntity.model.code + '-' + viewTitle))
 def test_viewtitle_none(self):
     for entries in self.entity:
         returnValue = getViewCode(entries)
         self.assertEqual(slugify2(entries.model.code + '-' + entries.code), returnValue)
 def test_GetViewCode_with_viewtitle_none(self):
     viewCode = getViewCode(self.pEntity)
     self.assertEqual(viewCode, slugify(self.pEntity.model.code + '-' + self.pEntity.code))