def test_hyper_into_uint32(self): s = server_id.server_id() def assign(): s.vnn = server_id.SERVERID_UNIQUE_ID_NOT_TO_VERIFY self.assertRaises(OverflowError, assign)
def test_negative_into_uint32(self): s = server_id.server_id() def assign(): s.vnn = -1 self.assertRaises(OverflowError, assign)
def test_negative_int_into_hyper(self): s = server_id.server_id() def assign(): s.unique_id = -1 self.assertRaises(OverflowError, assign)
def test_int_into_hyper(self): s = server_id.server_id() s.unique_id = 1
def test_uint32_into_hyper(self): s = server_id.server_id() s.unique_id = server_id.NONCLUSTER_VNN self.assertEquals(s.unique_id, 0xFFFFFFFFL)
def test_int_into_hyper(self): s = server_id.server_id() s.unique_id = 1 self.assertEquals(s.unique_id, 1)