From 3c7c4a61be65c2ad56b81a64d2e292e07df9718a Mon Sep 17 00:00:00 2001 From: deepeshgarg007 Date: Thu, 29 Nov 2018 14:28:01 +0530 Subject: [PATCH] Test case fix --- .../report/sales_analytics/test_analytics.py | 168 +++++++++--------- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/erpnext/selling/report/sales_analytics/test_analytics.py b/erpnext/selling/report/sales_analytics/test_analytics.py index f59fff46f7..5d68b06b6d 100644 --- a/erpnext/selling/report/sales_analytics/test_analytics.py +++ b/erpnext/selling/report/sales_analytics/test_analytics.py @@ -35,52 +35,52 @@ class TestAnalytics(unittest.TestCase): { "entity": "_Test Customer 1", "entity_name": "_Test Customer 1", - "apr": 0.0, - "may": 0.0, - "jun": 0.0, - "jul": 0.0, - "aug": 0.0, - "sep": 0.0, - "oct": 0.0, - "nov": 0.0, - "dec": 0.0, - "jan": 0.0, - "feb": 2000.0, - "mar": 0.0, + "apr_2017": 0.0, + "may_2017": 0.0, + "jun_2017": 0.0, + "jul_2017": 0.0, + "aug_2017": 0.0, + "oct_2017": 0.0, + "sep_2017": 0.0, + "nov_2017": 0.0, + "dec_2017": 0.0, + "jan_2018": 0.0, + "feb_2018": 2000.0, + "mar_2018": 0.0, "total":2000.0 }, { "entity": "_Test Customer 2", "entity_name": "_Test Customer 2", - "apr": 0.0, - "may": 0.0, - "jun": 0.0, - "jul": 0.0, - "aug": 0.0, - "sep": 1500.0, - "oct": 1000.0, - "nov": 0.0, - "dec": 0.0, - "jan": 0.0, - "feb": 0.0, - "mar": 0.0, + "apr_2017": 0.0, + "may_2017": 0.0, + "jun_2017": 0.0, + "jul_2017": 0.0, + "aug_2017": 0.0, + "sep_2017": 1500.0, + "oct_2017": 1000.0, + "nov_2017": 0.0, + "dec_2017": 0.0, + "jan_2018": 0.0, + "feb_2018": 0.0, + "mar_2018": 0.0, "total":2500.0 }, { "entity": "_Test Customer 3", "entity_name": "_Test Customer 3", - "apr": 0.0, - "may": 0.0, - "jun": 2000.0, - "jul": 1000.0, - "aug": 0.0, - "sep": 0.0, - "oct": 0.0, - "nov": 0.0, - "dec": 0.0, - "jan": 0.0, - "feb": 0.0, - "mar": 0.0, + "apr_2017": 0.0, + "may_2017": 0.0, + "jun_2017": 2000.0, + "jul_2017": 1000.0, + "aug_2017": 0.0, + "sep_2017": 0.0, + "oct_2017": 0.0, + "nov_2017": 0.0, + "dec_2017": 0.0, + "jan_2018": 0.0, + "feb_2018": 0.0, + "mar_2018": 0.0, "total": 3000.0 } ] @@ -103,18 +103,18 @@ class TestAnalytics(unittest.TestCase): expected_first_row = { "entity": "All Customer Groups", "indent": 0, - "apr": 0.0, - "may": 0.0, - "jun": 2000.0, - "jul": 1000.0, - "aug": 0.0, - "sep": 1500.0, - "oct": 1000.0, - "nov": 0.0, - "dec": 0.0, - "jan": 0.0, - "feb": 2000.0, - "mar": 0.0, + "apr_2017": 0.0, + "may_2017": 0.0, + "jun_2017": 2000.0, + "jul_2017": 1000.0, + "aug_2017": 0.0, + "sep_2017": 1500.0, + "oct_2017": 1000.0, + "nov_2017": 0.0, + "dec_2017": 0.0, + "jan_2018": 0.0, + "feb_2018": 2000.0, + "mar_2018": 0.0, "total":7500.0 } self.assertEqual(expected_first_row, report[1][0]) @@ -136,52 +136,52 @@ class TestAnalytics(unittest.TestCase): { "entity": "_Test Customer 1", "entity_name": "_Test Customer 1", - "apr": 0.0, - "may": 0.0, - "jun": 0.0, - "jul": 0.0, - "aug": 0.0, - "sep": 0.0, - "oct": 0.0, - "nov": 0.0, - "dec": 0.0, - "jan": 0.0, - "feb": 20.0, - "mar": 0.0, + "apr_2017": 0.0, + "may_2017": 0.0, + "jun_2017": 0.0, + "jul_2017": 0.0, + "aug_2017": 0.0, + "sep_2017": 0.0, + "oct_2017": 0.0, + "nov_2017": 0.0, + "dec_2017": 0.0, + "jan_2018": 0.0, + "feb_2018": 20.0, + "mar_2018": 0.0, "total":20.0 }, { "entity": "_Test Customer 2", "entity_name": "_Test Customer 2", - "apr": 0.0, - "may": 0.0, - "jun": 0.0, - "jul": 0.0, - "aug": 0.0, - "sep": 15.0, - "oct": 10.0, - "nov": 0.0, - "dec": 0.0, - "jan": 0.0, - "feb": 0.0, - "mar": 0.0, + "apr_2017": 0.0, + "may_2017": 0.0, + "jun_2017": 0.0, + "jul_2017": 0.0, + "aug_2017": 0.0, + "sep_2017": 15.0, + "oct_2017": 10.0, + "nov_2017": 0.0, + "dec_2017": 0.0, + "jan_2018": 0.0, + "feb_2018": 0.0, + "mar_2018": 0.0, "total":25.0 }, { "entity": "_Test Customer 3", "entity_name": "_Test Customer 3", - "apr": 0.0, - "may": 0.0, - "jun": 20.0, - "jul": 10.0, - "aug": 0.0, - "sep": 0.0, - "oct": 0.0, - "nov": 0.0, - "dec": 0.0, - "jan": 0.0, - "feb": 0.0, - "mar": 0.0, + "apr_2017": 0.0, + "may_2017": 0.0, + "jun_2017": 20.0, + "jul_2017": 10.0, + "aug_2017": 0.0, + "sep_2017": 0.0, + "oct_2017": 0.0, + "nov_2017": 0.0, + "dec_2017": 0.0, + "jan_2018": 0.0, + "feb_2018": 0.0, + "mar_2018": 0.0, "total": 30.0 } ]