コード例 #1
0
 def test_ViewCreation(self):
     for entries in self.entity:
         createView(entries, getViewCode(entries), getUserProfile(26))
     self.assertTrue(len(Prototype.objects.all()) > 0)
コード例 #2
0
 def test_viewtitle_none(self):
     for entries in self.entity:
         returnValue = getViewCode(entries)
         self.assertEqual(slugify2(entries.model.code + '-' + entries.code), returnValue)
コード例 #3
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)
コード例 #4
0
 def test_ViewCreation(self):
     for entries in self.entity:
         createView(entries, getViewCode(entries),
                    getUserProfile(26, 'prototype', ''))
     self.assertTrue(len(Prototype.objects.all()) > 0)
コード例 #5
0
 def test_viewtitle_specified(self):
     titleString = 'viewTitleViewTest'
     for entries in self.entity:
         returnValue = getViewCode(entries, titleString)
         self.assertEqual(slugify(entries.model.code + '-' + titleString),
                          returnValue)
コード例 #6
0
 def test_viewtitle_none(self):
     for entries in self.entity:
         returnValue = getViewCode(entries)
         self.assertEqual(slugify(entries.model.code + '-' + entries.code),
                          returnValue)
コード例 #7
0
 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))
コード例 #8
0
 def test_GetViewCode_with_viewtitle_none(self):
     viewCode = getViewCode(self.pEntity)
     self.assertEqual(viewCode, slugify(self.pEntity.model.code + '-' + self.pEntity.code))