CHICAGO — If this week was meant to be a test for the Cubs, they’ve certainly passed it, and now they’re right in the thick of a playoff chase in 2023.

A pair of winning series against two of the better teams in the National League can do that, with the last three coming against the best in baseball.

After taking two of three from the Reds at Wrigley Field earlier last week, the Cubs did the same against the Braves, including a 6-4 win on Sunday that ups their record to 58-54 on the year.

That puts David Ross’ team just a game-and-a-half behind the Brewers for first in the NL Central, the closest they’ve been since April 21 after a 13-0 win over the Dodgers at Wrigley Field. It puts the team in a position to win their first division championship since 2020, which is also the last time they qualified for the postseason.

Not bad for a team that just two weeks ago was closer to selling than buying at the MLB trade deadline, when it appeared their playoff chances were remote.

But trades to acquire third baseman Jeimer Candelario and reliever Jose Cuas indicated a change in thinking for the club after a strong stretch to start the second half. While some might have been skeptical because it came against struggling teams, this weekend eased some of those fears.

A 16-7 record since the break has them in the thick of the fight for either the division or a Wild Card spot, which they sit three games behind after Sunday. A six-game road trip is ahead with a deadline seller, the Mets, up first with a three-game series starting on Monday.

That’s the direction the Cubs could have gone but didn’t, and early on it’s paying dividens.