Ejemplo n.º 1
0
 def test_setter_bower(self):
     args = parser.parse_args(['--create', 'ds-three'])
     args = pos_parser(args)
     # simulate argument from CLI
     args.__dict__['name'] = 'iron-element'
     bower = Bower(bower_json=args.__dict__)
     data = bower.to_json()
     bower.bower = data # json/string
     self.assertIsInstance(bower.bower, dict)
     self.assertEqual(bower.bower['name'], 'iron-element')
Ejemplo n.º 2
0
 def test_json(self):
     args = parser.parse_args(['--create', 'ds-one'])
     args = pos_parser(args)
     # simulate argument from CLI
     args.__dict__['name'] = 'iron-element'
     bower = Bower(bower_json=args.__dict__)
     self.assertIsInstance(bower, Bower)
     data = bower.to_json()
     self.assertIsInstance(data, str)
     data = json.loads(data)
     self.assertIsInstance(data, dict)
Ejemplo n.º 3
0
 def test_get_bower(self):
     args = parser.parse_args(['--create', 'ds-two'])
     args = pos_parser(args)
     # simulate argument from CLI
     args.__dict__['name'] = 'iron-element'
     bower = Bower(bower_json=args.__dict__)
     self.assertIsInstance(bower.bower, dict)
Ejemplo n.º 4
0
 def test_validate_bower(self):
     b = {"name": "ds-new"}
     bower = Bower(b)
     self.assertIsInstance(bower, Bower)