Exemple #1
0
 def test_basic_get_github(self):
     """
     Test that json is parsed and a list is returned
     """
     data = json.load(open(CONTRIBUTORS_JSON, 'rb'))
     ht = HumansTXT()
     humans = ht.get_github(data)
     assert_equal(len(humans), 16)
Exemple #2
0
 def test_basic_get_github(self):
     """
     Test that json is parsed and a list is returned
     """
     data = json.load(open(CONTRIBUTORS_JSON, 'rb'))
     ht = HumansTXT()
     humans = ht.get_github(data)
     assert_equal(len(humans), 19)
Exemple #3
0
    def test_for_login_name_when_no_name(self):
        """
        Test that when object does't have 'name' it uses the 'login' instead.
        """
        data = json.load(open(CONTRIBUTORS_JSON, 'rb'))
        ht = HumansTXT()
        humans = ht.get_github(data)
        human = Human() 
        for h in humans:
            if h.name == "chengwang":
                human = h

        assert_equal(human.name, "chengwang")
Exemple #4
0
    def test_for_login_name_when_no_name(self):
        """
        Test that when object does't have 'name' it uses the 'login' instead.
        """
        data = json.load(open(CONTRIBUTORS_JSON, 'rb'))
        ht = HumansTXT()
        humans = ht.get_github(data)
        human = Human()
        for h in humans:
            if h.name == "chengwang":
                human = h

        assert_equal(human.name, "chengwang")