Example #1
0
    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)
Example #2
0
    def test_negative_into_uint32(self):
        s = server_id.server_id()

        def assign():
            s.vnn = -1

        self.assertRaises(OverflowError, assign)
Example #3
0
    def test_negative_int_into_hyper(self):
        s = server_id.server_id()

        def assign():
            s.unique_id = -1

        self.assertRaises(OverflowError, assign)
Example #4
0
 def test_int_into_hyper(self):
     s = server_id.server_id()
     s.unique_id = 1
Example #5
0
 def test_uint32_into_hyper(self):
     s = server_id.server_id()
     s.unique_id = server_id.NONCLUSTER_VNN
     self.assertEquals(s.unique_id, 0xFFFFFFFFL)
Example #6
0
 def test_negative_into_uint32(self):
     s = server_id.server_id()
     def assign():
         s.vnn = -1
     self.assertRaises(OverflowError, assign)
Example #7
0
 def test_int_into_hyper(self):
     s = server_id.server_id()
     s.unique_id = 1
     self.assertEquals(s.unique_id, 1)
Example #8
0
 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)
Example #9
0
 def test_negative_int_into_hyper(self):
     s = server_id.server_id()
     def assign():
         s.unique_id = -1
     self.assertRaises(OverflowError, assign)
Example #10
0
 def test_int_into_hyper(self):
     s = server_id.server_id()
     s.unique_id = 1
Example #11
0
 def test_uint32_into_hyper(self):
     s = server_id.server_id()
     s.unique_id = server_id.NONCLUSTER_VNN
     self.assertEquals(s.unique_id, 0xFFFFFFFFL)
Example #12
0
 def test_int_into_hyper(self):
     s = server_id.server_id()
     s.unique_id = 1
     self.assertEquals(s.unique_id, 1)