예제 #1
0
 def testBuyCommandCantBuyYourself(self):
     u1, u2, u3 = setupUsers(self.session, self.config)
     self.command._dispatch("buy", [u1.handle], u1.handle)
     assert self.fakeTwitter.updateStatusCalls[0] == '@' + u1.handle + ', you can\'t buy yourself ;)'
예제 #2
0
 def testBuyCommandAlreadyOwner(self):
     u1, u2, u3 = setupUsers(self.session, self.config)
     self.command._dispatch("buy", [u2.handle], u1.handle)
     assert self.fakeTwitter.updateStatusCalls[0] == '@' + u1.handle + ', you already own @' + u2.handle
예제 #3
0
 def testBuyCommandNotOwned(self):
     u1, u2, u3 = setupUsers(self.session, self.config)
     self.command._dispatch("buy", [u1.handle], u3.handle)
     print "foo" +  self.fakeTwitter.updateStatusCalls[0]
     assert self.fakeTwitter.updateStatusCalls[0] == '@' + u3.handle + ', congrats! You bought @' + u1.handle + ' for ' + str(self.config['startingPrice'])