def test_is_empty_nonzero_bytes(self): e = GirderDataElement('someId') e.get_file_model = mock.MagicMock(return_value={'size': 7}) self.assertFalse(e.is_empty())
def test_is_empty_zero_size(self): # Uses model return size parameter e = GirderDataElement('someId') e.get_file_model = mock.MagicMock(return_value={'size': 0}) self.assertTrue(e.is_empty())
def test_is_empty_none_model(self): # Uses model return, empty if no model return (no item in girder by # ID) e = GirderDataElement('someId') e.get_file_model = mock.MagicMock(return_value=None) self.assertTrue(e.is_empty())
def test_is_empty_nonzero_bytes(self): e = GirderDataElement('someId') e.get_file_model = mock.MagicMock(return_value={'size': 7}) self.assertFalse(e.is_empty())
def test_is_empty_zero_size(self): # Uses model return size parameter e = GirderDataElement('someId') e.get_file_model = mock.MagicMock(return_value={'size': 0}) self.assertTrue(e.is_empty())
def test_is_empty_none_model(self): # Uses model return, empty if no model return (no item in girder by # ID) e = GirderDataElement('someId') e.get_file_model = mock.MagicMock(return_value=None) self.assertTrue(e.is_empty())