diff --git a/src/gconfig.py b/src/gconfig.py index c810d0a..130f667 100644 --- a/src/gconfig.py +++ b/src/gconfig.py @@ -14,7 +14,7 @@ You should have received a copy of the GNU General Public License along with scoreboard-benchmark . If not, see . - + This the configuration file for the GUnicorn server. """ import multiprocessing diff --git a/src/resources/utilities.py b/src/resources/utilities.py index 9917f10..8bd5310 100644 --- a/src/resources/utilities.py +++ b/src/resources/utilities.py @@ -26,7 +26,6 @@ def to_zero_count(page_no): """ Will subtract 1 from the argument it gets, converting it to an int. If the conversion fails or the argument it's negatives it returns zero instead. - >>> to_zero_count(3) 2 >>> to_zero_count('a') @@ -61,7 +60,7 @@ def get_env_variable(variable, fallback): Returns: On success is returns the variable's value from the environment, on failure it returns the value provided by fallback - + >>> get_env_variable('HOMES', 'fallback') 'fallback' diff --git a/src/templates/index.html b/src/templates/index.html index 2411996..c67aac5 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -24,7 +24,7 @@ {{ item.gpu | truncate(50) }} {{ item.cpu | truncate(50) }} {{ item.score }} - See more + See more {% endfor %} diff --git a/src/views/scoreboard.py b/src/views/scoreboard.py index e5f795d..62b6297 100644 --- a/src/views/scoreboard.py +++ b/src/views/scoreboard.py @@ -83,13 +83,13 @@ def result_post(): @utilities.cache.cached(timeout=60*5) -@scoreboard.route("/result/", methods=['GET']) -def result(id): +@scoreboard.route("/result/", methods=['GET']) +def result(rid): """ Fetches an entry from the database and displays it in a view. The entry is retrieved from the database and the ID is a primary key for the entry. """ - entry_name = Result.query.filter_by(id=id).first() + entry_name = Result.query.filter_by(id=rid).first() if entry_name: progress_bar_data = dict() progress_bar_data['value'] = utilities.get_progress_bar_score(entry_name.score) diff --git a/test/test_utilities.py b/test/test_utilities.py index 6252f5b..888f844 100644 --- a/test/test_utilities.py +++ b/test/test_utilities.py @@ -55,7 +55,6 @@ class UtilitiesTestCase(unittest.TestCase): self.assertEqual(9, r) def test_get_environment_variable(self): - import os self.assertEqual(ut.get_env_variable("TESTING", "false"), 'false') os.environ['TESTING'] = 'True' self.assertEqual(ut.get_env_variable("TESTING", "false"), 'True')