'Test compound partition key definition'

def test_partition_keys(self):

    class ModelWithPartitionKeys(Model, ):
        id = columns.UUID(primary_key=True, default=(lambda : uuid4()))
        c1 = columns.Text(primary_key=True)
        p1 = columns.Text(partition_key=True)
        p2 = columns.Text(partition_key=True)
    cols = ModelWithPartitionKeys._columns
    self.assertTrue(cols['c1'].primary_key)
    self.assertFalse(cols['c1'].partition_key)
    self.assertTrue(cols['p1'].primary_key)
    self.assertTrue(cols['p1'].partition_key)
    self.assertTrue(cols['p2'].primary_key)
    self.assertTrue(cols['p2'].partition_key)
    obj = ModelWithPartitionKeys(p1='a', p2='b')
    self.assertEqual(obj.pk, ('a', 'b'))
