#NEWLINE# def test_post_tweet_successful( self ) : #NEWLINE# #INDENT# 'Posting a tweet is sucessful.' #NEWLINE# self . test_output . _last_published = ( datetime . now ( ) - timedelta ( seconds = ( self . test_output . _frequency + 1 ) ) ) #NEWLINE# units = self . test_output . units #NEWLINE# temp = 26 #NEWLINE# target = 20 #NEWLINE# heat = 0 #NEWLINE# cool = 100 #NEWLINE# expected_message = self . test_output . _message . format ( units = units , temp = temp , target = target , heat = heat , cool = cool ) #NEWLINE# self . test_output . publish_status ( 20 , 26 , 0 , 100 ) #NEWLINE# self . test_output . _api . statuses . update . assert_called_once_with ( status = expected_message )