Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
    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)