If you pass None as the second argument of BlobMedia it successfully creates an object but that object will raise TypeError: 'NoneType' has no length
whenever it is used. This creates some trippy experiences trying to track down the TypeError
.
For example:
img = BlobMedia("image/png", None) # executes successfully
print(img) # raises the TypeError
The expected behavior is that if the BlobMedia constructor recieves invalid input it is the constructor that throws the exception not the __repr__
or __str__
.