Ejemplo n.º 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)
Ejemplo n.º 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),
     ]
Ejemplo n.º 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),
     ]
Ejemplo n.º 4
0
 def setUp(self):
     super(UserBlockUnblockViewTests, self).setUp()
     self.user = UserFactory.create()
Ejemplo n.º 5
0
 def setUp(self):
     self.client = APIClient()
     self.user = UserFactory.create()
     self.client.force_authenticate(user=self.user)
Ejemplo n.º 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)
Ejemplo n.º 7
0
    def setUp(self):
        super(StartAuctionTests, self).setUp()

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