def METHOD_NAME(self):
    delta = timezone.timedelta(seconds=20)
    self.assertEqual(duration.seconds(delta), 20)
    self.assertEqual(duration.seconds(""), 0)
    self.assertRaises(TypeError, duration.seconds("not a delta"))