September 2018
Intermediate to advanced
412 pages
11h 12m
English
Tests are required to make sure the application we have built works correctly. To enable testing, you need to create the testbench sub-folder with the testAggregator.py file in the aggregator folder. The testAggregator.py file should contain the following code:
from analytic import aggregatorif __name__ == "__main__": a = aggregator() assert a.sum('{"timeseries": [[1501664960967,12,3],[1501664961973,48,3]]}') == {"result": 60}