예제 #1
0
    def setUp(self):
        super(FinishAuctionTests, self).setUp()

        self.auction = AuctionFactory.create(status=AUCTION_STATUS_OPEN)
        self.user1 = UserFactory.create()
        self.customer1 = CustomerFactory.create(user=self.user1)
        self.user2 = UserFactory.create()
        self.customer2 = CustomerFactory.create(user=self.user2)
        self.bid1 = BidFactory.create(auction=self.auction,
                                      user=self.user1,
                                      price=12000)
        self.bid2 = BidFactory.create(auction=self.auction,
                                      user=self.user2,
                                      price=13000)
예제 #2
0
 def setUp(self):
     super(CommentListViewTests, self).setUp()
     self.post = PostFactory.create()
     self.user = UserFactory.create()
     self.comments = [
         CommentFactory.create(post=self.post),
         CommentFactory.create(post=self.post),
     ]
예제 #3
0
 def setUp(self):
     super(PostCommentSerializerTests, self).setUp()
     self.user = UserFactory.create()
     self.post = PostFactory.create()
     self.comments = [
         CommentFactory.create(post=self.post),
         CommentFactory.create(post=self.post),
     ]
예제 #4
0
 def setUp(self):
     super(UserBlockUnblockViewTests, self).setUp()
     self.user = UserFactory.create()
예제 #5
0
 def setUp(self):
     self.client = APIClient()
     self.user = UserFactory.create()
     self.client.force_authenticate(user=self.user)
예제 #6
0
 def setUp(self):
     super(BidSerializerTests, self).setUp()
     self.user = UserFactory.create()
     self.auction = AuctionFactory.create()
     open_until = timezone.now() + timedelta(days=3)
     self.auction.start(open_until)
예제 #7
0
    def setUp(self):
        super(StartAuctionTests, self).setUp()

        self.auction = AuctionFactory.create()
        self.user = UserFactory.create()