Ejemplo n.º 1
0
 def test_handle(self):
     v = NubeCategory()
     v.handle('es', 'esta-es-el-handle --------- ')
     v.handle('es', 'esta-es-el-handle')
     self.assertDictEqual(v.get_dict(),
                          {'handle': {
                              'es': 'esta-es-el-handle'
                          }})
Ejemplo n.º 2
0
 def test_description(self):
     v = NubeCategory()
     v.description('es', 'esta es la descripción ---- ')
     v.description('es', 'esta es la descripción')
     self.assertDictEqual(v.get_dict(),
                          {'description': {
                              'es': 'esta es la descripción'
                          }})
Ejemplo n.º 3
0
 def test_name(self):
     v = NubeCategory()
     v.name('es', 'este es el nombre ----')
     v.name('es', 'Cuidados de la piel')
     self.assertDictEqual(v.get_dict(),
                          {'name': {
                              'es': 'Cuidados de la piel'
                          }})
Ejemplo n.º 4
0
 def test_seo_title(self):
     v = NubeCategory()
     v.seo_title('en', 'seo title ------- ')
     v.seo_title('en', 'seo title')
     v.seo_title('es', 'seo titulo')
     self.assertDictEqual(
         v.get_dict(),
         {'seo_title': {
             'es': 'seo titulo',
             'en': 'seo title'
         }})
Ejemplo n.º 5
0
 def test_seo_description(self):
     v = NubeCategory()
     v.seo_description('es', 'seo descripción ---- ')
     v.seo_description('es', 'seo descripción')
     v.seo_description('en', 'seo description')
     self.assertDictEqual(v.get_dict(), {
         'seo_description': {
             'es': 'seo descripción',
             'en': 'seo description'
         }
     })
Ejemplo n.º 6
0
 def test_subcategories(self):
     v = NubeCategory()
     v.subcategories([1, 2, 3])
     self.assertDictEqual(v.get_dict(), {'subcategories': [1, 2, 3]})
Ejemplo n.º 7
0
 def test_parent2(self):
     v = NubeCategory()
     v.parent(False)
     self.assertDictEqual(v.get_dict(), {'parent': None})
Ejemplo n.º 8
0
 def test_parent(self):
     v = NubeCategory()
     v.parent(123)
     self.assertDictEqual(v.get_dict(), {'parent': 123})
Ejemplo n.º 9
0
 def test_id1(self):
     v = NubeCategory()
     v.id(False)
     self.assertDictEqual(v.get_dict(), {})
Ejemplo n.º 10
0
 def test_id(self):
     v = NubeCategory()
     v.id(123456)
     self.assertDictEqual(v.get_dict(), {'id': 123456})