  We report the discovery by the HATNet survey of HAT-TR-318-007, a $P =
3.34395390\pm0.00000020$ d period detached double-lined M-dwarf binary with
total secondary eclipses. We combine radial velocity (RV) measurements from
TRES/FLWO 1.5 m, and time-series photometry from HATNet, FLWO 1.2 m, BOS 0.8 m
and NASA K2 Campaign 5, to determine the masses and radii of the component
stars: $M_{A} = 0.448\pm0.011$ $M_{\odot}$, $M_{B} =
0.2721^{+0.0041}_{-0.0042}$ $M_{\odot}$, $R_{A} = 0.4548^{+0.0035}_{-0.0036}$
$R_{\odot}$, and $R_{B} = 0.2913^{+0.0023}_{-0.0024}$ $R_{\odot}$. We obtained
a FIRE/Magellan near-infrared spectrum of the primary star during a total
secondary eclipse, and use this to obtain disentangled spectra of both
components. We determine spectral types of ST$_{A} = {\rm M}3.71\pm0.69$ and
ST$_{B} = {\rm M}5.01\pm0.73$, and effective temperatures of T$_{\rm eff,A} =
3190\pm110$ K and T$_{\rm eff,B} = 3100\pm110$ K, for the primary and secondary
star, respectively. We also measure a metallicity of [Fe/H]$=+0.298\pm0.080$
for the system. We find that the system has a small, but significant, non-zero
eccentricity of $0.0136\pm0.0026$. The K2 light curve shows a coherent
variation at a period of $3.41315^{+0.00030}_{-0.00032}$ d, which is slightly
longer than the orbital period, and which we demonstrate comes from the primary
star. We interpret this as the rotation period of the primary. We perform a
quantitative comparison between the Dartmouth stellar evolution models and the
seven systems, including HAT-TR-318-007, that contain M dwarfs with $0.2
M_{\odot} < M < 0.5 M_{\odot}$, have metallicity measurements, and have masses
and radii determined to better than 5% precision. Discrepancies between the
predicted and observed masses and radii are found for three of the systems.
