[test_grid] implemented tests for grid.py