Sure.
The reason is because you are looking at internal energy. It's true that the equation Qin = CvΔT is only true for constant volume. However, if you care about internal energy, it's always true.
To show why this is, think about what internal energy actually means. Internal energy is the energy contained within a system purely because the system's molecules are moving around. Temperature is a measure of the mean kinetic energy per particle in a system. Since the kinetic energy per particle at a given temperature is not dependent on the pressure (or, similarly, the volume), the internal energy should also be independent of pressure or volume.
Now, the reason this is often confused is because of the equation above - Qin = CvΔT only at constant volume. At constant pressure, Qin = CpΔT. However, this is the case because Qin isn't only going to the internal energy. In the case of the constant pressure case, some of the energy that is going into the system is being extracted by the fact that the system is expanding, and therefore doing work on its surroundings. Since the internal energy is equal to ΔQ-ΔW, this work done by the system exactly cancels out the different amount of energy that needed to be added to the system for a given ΔT, and thus, the change in internal energy is the same for the same ΔT, even though the system is not maintaining constant volume.