1919class TestCreateApiUserCommand (TestCase ):
2020 def test_create_simple_user (self ):
2121 buf = StringIO ()
22- call_command ("create-api-user " , "--email" , "foo@example.com" , stdout = buf )
22+ call_command ("create_api_user " , "--email" , "foo@example.com" , stdout = buf )
2323 output = buf .getvalue ()
2424 User = get_user_model ()
2525 user = User .objects .get (username = "foo@example.com" )
@@ -29,15 +29,15 @@ def test_create_simple_user(self):
2929 assert f"User foo@example.com created with API key: { user .auth_token .key } " in output
3030
3131 def test_create_simple_user_cannot_create_user_twice_with_same_email (self ):
32- call_command ("create-api-user " , "--email" , "foo1@example.com" )
32+ call_command ("create_api_user " , "--email" , "foo1@example.com" )
3333
3434 with pytest .raises (CommandError ):
35- call_command ("create-api-user " , "--email" , "foo1@example.com" )
35+ call_command ("create_api_user " , "--email" , "foo1@example.com" )
3636
3737 def test_create_user_with_names (self ):
3838 buf = StringIO ()
3939 call_command (
40- "create-api-user " ,
40+ "create_api_user " ,
4141 "--email" ,
4242 "foo3@example.com" ,
4343 "--first-name" ,
@@ -55,4 +55,4 @@ def test_create_user_with_names(self):
5555
5656 def test_create_simple_user_demands_a_valid_email (self ):
5757 with pytest .raises (CommandError ):
58- call_command ("create-api-user " , "--email" , "fooNOT AN EMAIL.com" )
58+ call_command ("create_api_user " , "--email" , "fooNOT AN EMAIL.com" )
0 commit comments