The state Department of Transportation blocked Tesla’s efforts to open dealerships in Fargo and Bismarck, prompting the lawsuit.