Exemple #1
0
 def get(self):
     """Handles GET requests."""
     self.values.update({
         'code_contributors_list': feconf.CODE_CONTRIBUTORS,
         'idea_contributors_str': utils.get_comma_sep_string_from_list(
             feconf.IDEA_CONTRIBUTORS),
     })
     self.render_template('about.html')
Exemple #2
0
    def test_get_comma_sep_string_from_list(self):
        """Test get_comma_sep_string_from_list method."""
        alist = ['a', 'b', 'c', 'd']
        results = ['', 'a', 'a and b', 'a, b and c', 'a, b, c and d']

        for i in range(len(alist) + 1):
            comma_sep_string = utils.get_comma_sep_string_from_list(alist[:i])
            self.assertEqual(comma_sep_string, results[i])
Exemple #3
0
    def test_get_comma_sep_string_from_list(self):
        """Test get_comma_sep_string_from_list method."""
        alist = ['a', 'b', 'c', 'd']
        results = ['', 'a', 'a and b', 'a, b and c', 'a, b, c and d']

        for i in range(len(alist) + 1):
            comma_sep_string = utils.get_comma_sep_string_from_list(alist[:i])
            self.assertEqual(comma_sep_string, results[i])