Ejemplo n.º 1
0
 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]
     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_top_package_owners(self):
     owners = Stats.top_package_owners()
     owners = [(owner.name, count) for owner, count in owners]
     assert_equal(owners, [('bob', 4)])
 def test_top_tags(self):
     tags = Stats.top_tags()
     tags = [(tag.name, count) for tag, count in tags]
     assert_equal(tags, [('tag1', 3), ('tag2', 1)])
 def test_largest_groups(self):
     grps = Stats.largest_groups()
     grps = [(grp.name, count) for grp, count in grps]
     assert_equal(grps, [('grp1', 3), ('grp2', 2)])
 def test_top_rated_packages(self):
     pkgs = Stats.top_rated_packages()
     assert pkgs == []
Ejemplo n.º 7
0
 def test_top_package_owners(self):
     owners = Stats.top_package_owners()
     owners = [(owner.name, count) for owner, count in owners]
     assert_equal(owners, [('bob', 4)])
Ejemplo n.º 8
0
 def test_top_tags(self):
     tags = Stats.top_tags()
     tags = [(tag.name, count) for tag, count in tags]
     assert_equal(tags, [('tag1', 3),
                         ('tag2', 1)])
Ejemplo n.º 9
0
 def test_largest_groups(self):
     grps = Stats.largest_groups()
     grps = [(grp.name, count) for grp, count in grps]
     assert_equal(grps, [('grp1', 3),
                         ('grp2', 2)])
Ejemplo n.º 10
0
 def test_top_rated_packages(self):
     pkgs = Stats.top_rated_packages()
     assert pkgs == []