title: getting "TypeError: __init__() takes 1 positional argument but 10 were given"
body: <p>I am trying to run a unittest to see if my database table is saving information as it should. However, I continuously get this error,</p>
  <blockquote>
  <p><code>u1 = User(&quot;test&quot;, &quot;user&quot;, &quot;testuser123&quot;, &quot;test@test.com&quot;, &quot;password&quot;, None, &quot;California&quot;, None, None)</code><br />
  TypeError: <code>__init__()</code> takes 1 positional argument but 10 were given&quot;</p>
  </blockquote>
  <p>I find it odd because I am submitting all the data that my model class requires. Here is my code:</p>
  <p>Models.py file</p>
  <pre><code>class User (db.Model):
      &quot;&quot;&quot;User in the system&quot;&quot;&quot;
  
      __tablename__ = &quot;users&quot; 
  
      id = db.Column( 
          db.Integer, 
          primary_key=True    
      )   
      firstname = db.Column(  
          db.Text,    
          nullable=False  
      )   
      lastname = db.Column(   
          db.Text,    
          nullable=False  
      )   
      username = db.Column(   
          db.Text,    
          nullable=False, 
          unique=True 
      )   
      email = db.Column(  
          db.Text,    
          nullable=False, 
          unique=True 
      )   
      password = db.Column(   
          db.Text,    
          nullable=False  
      )   
      image = db.Column(  
          db.Text 
      )   
      state = db.Column(  
          db.Text,    
          nullable=False  
      )   
      vax_date = db.Column(   
          db.Text,
          nullable=True  
      )   
      covid_status = db.Column(   
          db.Text,
          nullable=True
      )   
  
      review = db.relationship('Review', backref='users')
  
  </code></pre>
  <p>Here is my unittest</p>
  <pre><code>class UserModelTestCase(TestCase):
      &quot;&quot;&quot;Test case for User Model&quot;&quot;&quot;
  
      def setUp(self):
          &quot;&quot;&quot;Create test client, add sample data.&quot;&quot;&quot;
  
          db.drop_all()
          db.create_all()
  
          u1 = User(&quot;test&quot;, &quot;user&quot;, &quot;testuser123&quot;, &quot;test@test.com&quot;, &quot;password&quot;, None, &quot;California&quot;, None, None)
          uid1 = 1111
          u1.id = uid1
          
          db.session.commit()
  
          u1 = User.query.get(uid1)
  
          self.u1 = u1
          self.uid1 = uid1
  
          self.client = app.test_client()
  
      def tearDown(self):
          res = super().tearDown()
          db.session.rollback()
          return res
  
      def test_user_model(self):
          &quot;&quot;&quot;Does basic model work?&quot;&quot;&quot;
  
          u = User(
              firstname='test',
              lastname='case',
              username=&quot;testuser&quot;,
              email=&quot;test@testing.com&quot;,
              password=&quot;HASHED_PASSWORD&quot;,
              image=None,
              state=&quot;Arizona&quot;
          )
  
          db.session.add(u)
          db.session.commit()
  
          # User should have no messages &amp; no followers
          self.assertEqual(u.firstname, 'test')
  </code></pre>