示例#1
0
    def tearDown(self):
        """
        Clean up database...
        """
        TestUnitSetUp.tearDown(self)

        if self.position_set is not None:
            self.position_set = self.position_set
            """:type: PositionSet"""

            self.position_set.filledorder_set.update(position_set=None)
            self.position_set.positioninstrument_set.update(position_set=None)
            self.position_set.positionfuture_set.update(position_set=None)
            self.position_set.positionforex_set.update(position_set=None)
            self.position_set.profitloss_set.update(position_set=None)

            if self.position_set.id:
                self.position_set.delete()
示例#2
0
    def tearDown(self):
        """
        Clean up database...
        """
        TestUnitSetUp.tearDown(self)

        if self.position_set is not None:
            self.position_set = self.position_set
            """:type: PositionSet"""

            self.position_set.filledorder_set.update(position_set=None)
            self.position_set.positioninstrument_set.update(position_set=None)
            self.position_set.positionfuture_set.update(position_set=None)
            self.position_set.positionforex_set.update(position_set=None)
            self.position_set.profitloss_set.update(position_set=None)

            if self.position_set.id:
                self.position_set.delete()
示例#3
0
 def tearDown(self):
     """
     Remove temp username
     """
     TestUnitSetUp.tearDown(self)
     User.objects.get(username='******').delete()
示例#4
0
 def tearDown(self):
     """
     Remove temp username
     """
     TestUnitSetUp.tearDown(self)
     User.objects.get(username='******').delete()