Python class to implement a list with a size limit
Below,  I have slightly recast your class.  In those changes are incorporated two suggestions.

1) If limiting the size of the structure, do it at the input:

I removed the length check from get_list() and moved it to push()

2) Class attributes are not instance attributes:

You code had a bug whereby the ls attribute was declared on the class and not  on the instance. In the case of:

class MaxSizeList(object):

    ls = []


ls will be shared will all instances of MaxSizeList.  What you need is actually:

class MaxSizeList(object):

    def __init__(self, max_length):
        self.ls = []


In this case, every instance will get its own ls. 

I am going to guess that this is why you needed to do the limiting on the output and not on the input.  That combined with using the same test data for the a and the b instance allowed your test cases to pass even with a substantial bug.

Code:

class MaxSizeList(object):

    def __init__(self, max_length):
        self.max_length = max_length
        self.ls = []

    def push(self, st):
        if len(self.ls) == self.max_length:
            self.ls.pop(0)
        self.ls.append(st)

    def get_list(self):
        return self.ls