Added test case
diff --git a/erpnext/schools/doctype/assessment_result/assessment_result.py b/erpnext/schools/doctype/assessment_result/assessment_result.py
index 7ef3240..d39f3ca 100644
--- a/erpnext/schools/doctype/assessment_result/assessment_result.py
+++ b/erpnext/schools/doctype/assessment_result/assessment_result.py
@@ -22,4 +22,3 @@
d.grade = get_grade(self.grading_scale, (flt(d.score)/d.maximum_score)*100)
self.total_score += d.score
self.grade = get_grade(self.grading_scale, (self.total_score/self.maximum_score)*100)
-
\ No newline at end of file
diff --git a/erpnext/schools/doctype/assessment_result/test_assessment_result.py b/erpnext/schools/doctype/assessment_result/test_assessment_result.py
index a889be0..66e611c 100644
--- a/erpnext/schools/doctype/assessment_result/test_assessment_result.py
+++ b/erpnext/schools/doctype/assessment_result/test_assessment_result.py
@@ -5,8 +5,15 @@
import frappe
import unittest
+from erpnext.schools.api import get_grade
# test_records = frappe.get_test_records('Assessment Result')
class TestAssessmentResult(unittest.TestCase):
- pass
+ def test_grade(self):
+ grade = get_grade("_Test Grading Scale", 80)
+ self.assertEquals("A", grade)
+
+ grade = get_grade("_Test Grading Scale", 70)
+ self.assertEquals("B", grade)
+
\ No newline at end of file
diff --git a/erpnext/schools/doctype/evaluation_criteria/test_records.json b/erpnext/schools/doctype/evaluation_criteria/test_records.json
new file mode 100644
index 0000000..64ff701
--- /dev/null
+++ b/erpnext/schools/doctype/evaluation_criteria/test_records.json
@@ -0,0 +1,8 @@
+[
+ {
+ "evaluation_criteria": "_Test Evaluation Criteria"
+ },
+ {
+ "evaluation_criteria": "_Test Evaluation Criteria 1"
+ }
+]
\ No newline at end of file
diff --git a/erpnext/schools/doctype/grading_scale/test_records.json b/erpnext/schools/doctype/grading_scale/test_records.json
new file mode 100644
index 0000000..fbe7d99
--- /dev/null
+++ b/erpnext/schools/doctype/grading_scale/test_records.json
@@ -0,0 +1,15 @@
+[
+ {
+ "grading_scale_name": "_Test Grading Scale",
+ "intervals": [
+ {
+ "grade_code": "A",
+ "threshold": 75
+ },
+ {
+ "grade_code": "B",
+ "threshold": 50
+ }
+ ]
+ }
+]
\ No newline at end of file