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 ;)'
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
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'])