Example #1
0
 def test_set_and_get(self):
     table = mock.MockTable()
     self.assertEqual(None, table.get('Key'))
     table['Key'] = 'Value'
     self.assertEqual('Value', table.get('Key'))
     self.assertEqual('Value', table.get('key'))
     self.assertEqual('Value', table.get('KEY'))
     self.assertEqual('Value', table['Key'])
     self.assertEqual('Value', table['key'])
     self.assertEqual('Value', table['KEY'])
Example #2
0
 def test_create_from_list(self):
     table = mock.MockTable([('Key', 'Value')])
     self.assertEqual('Value', table.get('KEY'))
     self.assertEqual('Value', table['key'])
Example #3
0
 def test_create_from_dict(self):
     table = mock.MockTable({'Key': 'Value'})
     self.assertEqual('Value', table.get('KEY'))
     self.assertEqual('Value', table['key'])
Example #4
0
 def test_create_from_tuple(self):
     table = mock.MockTable((('Key', 'Value'), ))
     self.assertEqual('Value', table.get('KEY'))
     self.assertEqual('Value', table['key'])