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')
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)