def test_most_edited_packages(self): pkgs = Stats.most_edited_packages() pkgs = [(pkg.name, count) for pkg, count in pkgs] assert_equal(pkgs[0], ('test3', 3)) assert_equal(pkgs[1][1], 2) assert_equal(pkgs[2][1], 2) assert_equal(pkgs[3], ('test1', 1))
def test_most_edited_packages(self): pkgs = Stats.most_edited_packages() pkgs = [(pkg.name, count) for pkg, count in pkgs] # test2 does not come up because it was deleted # test3 does not come up because it is private assert_equal(pkgs[0], ('test4', 2)) assert_equal(pkgs[1], ('test1', 1))
def test_most_edited_packages(self): pkgs = Stats.most_edited_packages() pkgs = [(pkg.name, count) for pkg, count in pkgs] # test2 does not come up because it was deleted # test3 does not come up because it is private assert_equal(pkgs[0], ('test4', 2)) assert_equal(pkgs[1], ('test1', 1))
def test_most_edited_packages(self): pkgs = Stats.most_edited_packages() pkgs = [(pkg.name, count) for pkg, count in pkgs] assert_equal(pkgs[0], ('test3', 3)) assert_equal(pkgs[1][1], 2) assert_equal(pkgs[2][1], 2) assert_equal(pkgs[3], ('test1', 1))
def test_most_edited_packages(self): pkgs = Stats.most_edited_packages() pkgs = [(pkg.name, count) for pkg, count in pkgs] # test2 does not come up because it was deleted # test3 does not come up because it is private test1 = 'test1', 1 test4 = 'test4', 2 assert len(pkgs[0]) == len(test1) assert all([a == b for a, b in zip(pkgs[0], test4)]) assert len(pkgs[1]) == len(test4) assert all([a == b for a, b in zip(pkgs[1], test1)])