Skip to content

Commit

Permalink
Fix tests for CubeService, CellService
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusWirtz committed Jan 26, 2024
1 parent 9e4d03d commit 52cd037
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions TM1py/Services/CellService.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import functools
import itertools
import json
import math
import uuid
import warnings
from collections import OrderedDict
Expand Down
5 changes: 4 additions & 1 deletion Tests/CubeService_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class TestCubeService(unittest.TestCase):
prefix = "TM1py_Tests_Cube_"

cube_name = prefix + "some_name"
cube_name_to_delete = prefix + "Some_Other_Name"
control_cube_name = '}' + prefix + 'some_control_cube_name'
dimension_names = [
prefix + "dimension1",
Expand Down Expand Up @@ -104,7 +105,7 @@ def test_exists(self):
self.assertFalse(self.tm1.cubes.exists(uuid.uuid4()))

def test_create_delete_cube(self):
cube_name = self.prefix + "Some_Other_Name"
cube_name = self.cube_name_to_delete
# element with index 0 is Sandboxes
dimension_names = self.tm1.dimensions.get_all_names()[1:3]
cube = Cube(cube_name, dimension_names)
Expand Down Expand Up @@ -304,6 +305,8 @@ def test_get_measure_dimension(self):
@classmethod
def tearDown(cls):
cls.tm1.cubes.delete(cls.cube_name)
if cls.tm1.cubes.exists(cls.cube_name_to_delete):
cls.tm1.cubes.delete(cls.cube_name_to_delete)
for dimension in cls.dimension_names:
cls.tm1.dimensions.delete(dimension)
cls.tm1.logout()
Expand Down

0 comments on commit 52cd037

Please sign in to comment.