コード例 #1
0
ファイル: tests_models.py プロジェクト: ar4s/ralph_assets
    def setUp(self):
        self.category = create_category()
        self.category.is_blade = True
        self.category.save()
        self.asset = create_asset(
            sn='1111-1111-1111-1111',
            invoice_date=datetime.date(2012, 11, 28),
            support_period=1,
            slots=12.0,
            price=100,
            deprecation_rate=100,
            category=self.category,
        )

        part_info = PartInfo(device=self.asset)
        part_info.save()
        self.asset2 = create_asset(
            sn='1111-1111-1111-11132',
            invoice_date=datetime.date(2012, 11, 28),
            support_period=1,
            slots=12.0,
            price=100,
            part_info=part_info,
            deprecation_rate=50,
            category=self.category,
        )
コード例 #2
0
ファイル: tests_models.py プロジェクト: inc0/ralph_assets
 def setUp(self):
     self.asset = create_asset(
         sn='1111-1111-1111-1111',
         invoice_date=datetime.date(2012, 11, 28),
         support_period=1,
         slots=12.0,
         price=100,
     )
     part_info = PartInfo(device=self.asset)
     part_info.save()
     self.asset2 = create_asset(
         sn='1111-1111-1111-11132',
         invoice_date=datetime.date(2012, 11, 28),
         support_period=1,
         slots=12.0,
         price=100,
         part_info=part_info,
     )
コード例 #3
0
ファイル: tests_models.py プロジェクト: quamilek/ralph_assets
    def setUp(self):
        self.category = AssetSubCategoryFactory(is_blade=True)
        self.model = AssetModelFactory(category=self.category)
        self.asset = AssetFactory(
            invoice_date=datetime.date(2012, 11, 28),
            support_period=1,
            slots=12.0,
            price=100,
            deprecation_rate=100,
            model=self.model,
        )

        part_info = PartInfo(device=self.asset)
        part_info.save()
        self.asset2 = AssetFactory(
            invoice_date=datetime.date(2012, 11, 28),
            support_period=1,
            slots=12.0,
            price=100,
            part_info=part_info,
            deprecation_rate=50,
            model=self.model,
        )