def test_all_variants(self):
        collection = MpNumberCollection()
        collection.read_json(FIXTURE_PATH)
        variants = collection.all_variants()

        assert type(variants[0]) == MpNumberVariant
        assert len(variants) == 769
    def test_write_json(self):
        os.remove(OUTPUT_PATH)

        collection = MpNumberCollection()
        collection.read_json(FIXTURE_PATH)
        collection.write_json(OUTPUT_PATH)

        with open(FIXTURE_PATH, "r") as f:
            original_json = json.load(f)

        with open(OUTPUT_PATH, "r") as f:
            parsed_json = json.load(f)

        assert original_json == parsed_json
    def test_read_json(self):
        collection = MpNumberCollection()
        collection.read_json(FIXTURE_PATH)

        assert collection.count() == 703