title: upload a test file using moto and boto3
body: <p>I want to test conduct testing on imported files from aws.
  I mock s3 using moto, in order to not mess with actual data. However, now the aws seems to be empty, thus I decided to upload some test file on mocked s3. How can I do so?</p>
  <p>This is my setup,<br>
  Conftest.py:</p>
  <pre><code>@pytest.fixture(scope='function')
  def aws_credentials():
      &quot;&quot;&quot;Mocked AWS Credentials for moto.&quot;&quot;&quot;
      os.environ['AWS_ACCESS_KEY_ID'] = 'testing'
      os.environ['AWS_SECRET_ACCESS_KEY'] = 'testing'
      os.environ['AWS_SECURITY_TOKEN'] = 'testing'
      os.environ['AWS_SESSION_TOKEN'] = 'testing'
  
  
  @pytest.fixture(scope='function')
  def s3(aws_credentials):
      with mock_s3():
          yield boto3.client('s3', region_name='us-east-1')
  </code></pre>
  <p>Test file:</p>
  <pre><code>class TestLoadRecommendations:
  
      @pytest.fixture(autouse=True)
      def _setup(self, s3):
          self.bucket = s3.create_bucket(Bucket=settings.SERVER_DATA_S3_BUCKET)
          self.bucket.upload_file(&quot;tmp/recommendations-2021-04-13T17_28_06.csv&quot;, &quot;tmp/recommendations-2021-04-13T17_28_06.csv&quot;)
  </code></pre>
  <p>However, instead uploading it throws an error <code>TypeError: expected string or bytes-like object</code> but I am sure that I use incorrect command for file upload.
  Could anybody help? Thanks!</p>