The assumption is applicable only to an ideal gas and not upon a real gas because real gases can be liquefied by cooling and applying high pressure.
This clearly shows that forces of attraction are present in the molecules of a real gas otherwise the gas would never have liquefied.