def testTotalModeShare(self): modeshare = carbon.getModeShare(None, self.weekago, self.now) self.assertEqual(modeshare['walking'], 5) self.assertEqual(modeshare['bus'], 5) self.assertEqual(modeshare['cycling'], 0) self.assertEqual(modeshare['car'], 0) self.assertEqual(modeshare['train'], 0)
def testMyModeShare(self): modeshare = carbon.getModeShare('*****@*****.**', self.weekago, self.now) print modeshare self.assertEqual(modeshare['walking'], 1) self.assertEqual(modeshare['bus'], 1) self.assertEqual(modeshare['cycling'], 0) self.assertEqual(modeshare['car'], 0) self.assertEqual(modeshare['train'], 0)