示例#1
0
 def test_count_by_platform(self):
     r = Reports()
     result = r.count_by_platform()
     self.assertIsInstance(result, list)
     self.assertEqual(len(result), 1)
     self.assertAlmostEqual(list(result[0].keys()),
                            ["mac", "windows", "linux", "all"])
示例#2
0
def run():
    r = Reports()
    pprint(r.freeVsPaid())
示例#3
0
 def test_count_by_genre(self):
     r = Reports()
     result = r.count_by_genre()
     self.assertIsInstance(result, list)
示例#4
0
 def test_freeVsPaid(self):
     r = Reports()
     result = r.freeVsPaid()
     self.assertIsInstance(result, dict)
     self.assertAlmostEqual(list(result.keys()), ["free", "paid"])
示例#5
0
 def test_singleMultiPlayer(self):
     r = Reports()
     result = r.singleMultiPlayer()
     self.assertIsInstance(result, dict)
     self.assertAlmostEqual(list(result.keys()), ["single", "multi"])
示例#6
0
 def test_buys_vs_price(self):
     r = Reports()
     result = r.buys_vs_price()
     self.assertIsInstance(result, list)
示例#7
0
 def test_price_vs_users(self):
     r = Reports()
     result = r.price_vs_users()
     self.assertIsInstance(result, list)
示例#8
0
 def test_sales_by_region(self):
     r = Reports()
     result = r.sales_by_region()
     self.assertIsInstance(result, dict)