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)
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)
def test_validate_bower(self): b = {"name": "ds-new"} bower = Bower(b) self.assertIsInstance(bower, Bower)