class TestWebserviceDb(unittest.TestCase):
    def setUp(self):
        self.wsDb = WebserviceDb("http://localhost:8000", "quiltro", "perroCallejero")
        self.wsDb.service.postStreamings(generateOneStreaming(streamingId = 1))
        self.wsDb.service.postSearches(generateOneSearch(searchId = 1))
        
    def test_sendData(self):
        userList = generateOneUser(userId = 1)
        tweetList = generateManyTweets(randomInteger(100), userId = 1)
        tweetStreamingList = ObjectList()
        tweetSearchList = ObjectList()
        for tweet in tweetList.getList():
            tweetStreaming = TweetStreaming(randomTweetStreaming(tweet.id, 1))
            tweetStreamingList.append(tweetStreaming)
            tweetSearch = TweetSearch(randomTweetSearch(tweet.id, 1))
            tweetSearchList.append(tweetSearch)
        self.wsDb.sendData(tweetList, userList, tweetStreamingList, tweetSearchList)
 def setUp(self):
     self.wsDb = WebserviceDb("http://localhost:8000", "quiltro", "perroCallejero")
     self.wsDb.service.postStreamings(generateOneStreaming(streamingId = 1))
     self.wsDb.service.postSearches(generateOneSearch(searchId = 1))