def seed_asset(): # get project _project = Project.find_all_projects()[0] # create category and asset _assetCategory = AssetCategory.create_asset_category("sample_asset") return Asset.create_asset("sample_project", _project, _assetCategory)
def fill_datas(self): """fill tables with test datas :return: """ self.asset_category = AssetCategory.create_asset_category("test_asset") self.project = Project.create_project("test_project", "test", 2020, 2021) self.asset = Asset.create_asset("test_asset", self.project, self.asset_category, 10)