def test_coord_formatter(self):

        global TO

        # Test errors - all should return NULL
        expected = TO["db_null"]
        actual = nrcSpreadsheetScraper.NrcParsedReportFields._coord_formatter(db_null_value=TO["db_null"])
        self.assertEqual(expected, actual)
        actual = nrcSpreadsheetScraper.NrcParsedReportFields._coord_formatter(
            db_null_value=TO["db_null"], **{"NOTHING": None}
        )
        self.assertEqual(expected, actual)

        # Test with actual content
        row = {"degree": 28.0, "minute": 24.0, "second": 25.0, "quadrant": "N"}
        map_def = {
            "processing": {
                "args": {
                    "col_degrees": "degree",
                    "col_minutes": "minute",
                    "col_seconds": "second",
                    "col_quadrant": "quadrant",
                }
            }
        }
        expected = nrcSpreadsheetScraper.dms2dd(row["degree"], row["minute"], row["second"], row["quadrant"])
        actual = nrcSpreadsheetScraper.NrcParsedReportFields._coord_formatter(
            db_null_value=TO["db_null"], row=row, map_def=map_def
        )
        self.assertEqual(expected, actual)
    def test_standard(self):

        """
        Test standard use-case
        """

        # Degrees, minutes, seconds, quadrant
        for test_input in ([29, 23, 23, "N"], [89, 14, 29, "W"]):
            d, m, s, q = test_input
            q = q.lower()
            expected = d + m / 60 + s / 3600
            if q in ("s", "w"):
                expected *= -1
            actual = nrcSpreadsheetScraper.dms2dd(*test_input)
            self.assertEqual(expected, actual)